From 010425dc3dba383d0aaf9f907a5d71c9195e0603 Mon Sep 17 00:00:00 2001 From: Magnus Kokk Date: Fri, 25 Oct 2024 11:35:52 +0300 Subject: [PATCH] Add docker compose file for testing --- README.md | 21 +++++++++++++++++++++ docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index cb96823..1fa9101 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ A FreshRSS extension for automatic feed refresh TTL based on the average frequen It dynamically adjusts the update TTL of feeds which use the default TTL option. # Configuration + The main configurable value is the max TTL. Feeds that use the default TTL are updated at an interval between the default and max TTL. It is recommended to configure max TTL to be greater than default TTL. @@ -14,3 +15,23 @@ depending on the average frequency of entries. When a feed becomes idle (the last entry is more than 2x max TTL ago), the feed will fall back to be updated once every max TTL until the feed becomes active again. ![Screenshot 2024-10-17 at 16-42-11 AutoTTL · Extensions · FreshRSS](https://github.com/user-attachments/assets/ba712811-d65b-4cd7-ba91-c8cba5c40d64) + +# Testing + +Run `docker compose up` and open browser at `http://localhost:8080`. + +## MySQL credentials + +Host: `mysql` +Username: `freshrss` +Password: `freshrss` +Database: `freshrss` + +## PostgreSQL credentials + +Host: `postgres` +Username: `freshrss` +Password: `freshrss` +Database: `freshrss` + +To reset, run `docker compose down`. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2f8fa2d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +--- +services: + mysql: + image: mysql + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_USER: freshrss + MYSQL_PASSWORD: freshrss + MYSQL_DATABASE: freshrss + tmpfs: + - /var/lib/mysql:uid=999,gid=999 + + postgres: + image: postgres + environment: + POSTGRES_PASSWORD: freshrss + POSTGRES_USER: freshrss + POSTGRES_DB: freshrss + tmpfs: + - /var/lib/postgresql:uid=999,gid=999 + + freshrss: + image: freshrss/freshrss:latest + container_name: freshrss + hostname: freshrss + restart: unless-stopped + logging: + options: + max-size: 10m + volumes: + - .:/var/www/FreshRSS/extensions/FreshRSS-AutoTTL + environment: + CRON_MIN: '*' + TRUSTED_PROXY: 172.16.0.1/12 192.168.0.1/16 + FRESHRSS_ENV: development + ports: + - "8080:80"