From de08f674350d5ccb8ed1cf45e408f0c12a3ae44e Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:57:29 +0200 Subject: [PATCH] Feat: Other DB options for freshrss --- templates/compose/freshrss-with-mariadb.yaml | 38 +++++++++++++++++ templates/compose/freshrss-with-mysql.yaml | 38 +++++++++++++++++ .../compose/freshrss-with-postgresql.yaml | 41 +++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 templates/compose/freshrss-with-mariadb.yaml create mode 100644 templates/compose/freshrss-with-mysql.yaml create mode 100644 templates/compose/freshrss-with-postgresql.yaml diff --git a/templates/compose/freshrss-with-mariadb.yaml b/templates/compose/freshrss-with-mariadb.yaml new file mode 100644 index 000000000..b280d883e --- /dev/null +++ b/templates/compose/freshrss-with-mariadb.yaml @@ -0,0 +1,38 @@ +# documentation: https://freshrss.org/index.html +# slogan: A free, self-hostable feed aggregator. +# tags: rss, feed +# logo: svgs/freshrss.png +# port: 80 + +services: + freshrss: + image: freshrss/freshrss:latest + environment: + - SERVICE_FQDN_FRESHRSS_80 + - CRON_MIN=${CRON_MIN:-1,31} + - MARIADB_DB=${MARIADB_DATABASE:-freshrss} + - MARIADB_USER=${SERVICE_USER_MARIADB} + - MARIADB_PASSWORD=${SERVICE_PASSWORD_MARIADB} + volumes: + - freshrss-data:/var/www/FreshRSS/data + - freshrss-extensions:/var/www/FreshRSS/extensions + healthcheck: + test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/80' || exit 1"] + interval: 5s + timeout: 20s + retries: 3 + + mariadb: + image: mariadb:11 + volumes: + - mariadb-data:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT + - MYSQL_DATABASE=${MARIADB_DATABASE:-freshrss} + - MYSQL_USER=${SERVICE_USER_MARIADB} + - MYSQL_PASSWORD=${SERVICE_PASSWORD_MARIADB} + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 5s + timeout: 20s + retries: 10 diff --git a/templates/compose/freshrss-with-mysql.yaml b/templates/compose/freshrss-with-mysql.yaml new file mode 100644 index 000000000..6e6be9320 --- /dev/null +++ b/templates/compose/freshrss-with-mysql.yaml @@ -0,0 +1,38 @@ +# documentation: https://freshrss.org/index.html +# slogan: A free, self-hostable feed aggregator. +# tags: rss, feed +# logo: svgs/freshrss.png +# port: 80 + +services: + freshrss: + image: freshrss/freshrss:latest + environment: + - SERVICE_FQDN_FRESHRSS_80 + - CRON_MIN=${CRON_MIN:-1,31} + - MYSQL_DB=${MYSQL_DATABASE:-freshrss} + - MYSQL_USER=${SERVICE_USER_MYSQL} + - MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL} + volumes: + - freshrss-data:/var/www/FreshRSS/data + - freshrss-extensions:/var/www/FreshRSS/extensions + healthcheck: + test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/80' || exit 1"] + interval: 5s + timeout: 20s + retries: 3 + + mysql: + image: mysql:8 + volumes: + - mysql-data:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT + - MYSQL_DATABASE=${MYSQL_DATABASE:-freshrss} + - MYSQL_USER=$SERVICE_USER_MYSQL + - MYSQL_PASSWORD=$SERVICE_PASSWORD_MYSQL + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"] + interval: 5s + timeout: 20s + retries: 10 diff --git a/templates/compose/freshrss-with-postgresql.yaml b/templates/compose/freshrss-with-postgresql.yaml new file mode 100644 index 000000000..8928dfd56 --- /dev/null +++ b/templates/compose/freshrss-with-postgresql.yaml @@ -0,0 +1,41 @@ +# documentation: https://freshrss.org/index.html +# slogan: A free, self-hostable feed aggregator. +# tags: rss, feed +# logo: svgs/freshrss.png +# port: 80 + +services: + freshrss: + image: freshrss/freshrss:latest + environment: + - SERVICE_FQDN_FRESHRSS_80 + - CRON_MIN=${CRON_MIN:-1,31} + - POSTGRES_DB=${POSTGRESQL_DATABASE:-freshrss} + - POSTGRES_USER=${SERVICE_USER_POSTGRESQL} + - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} + - POSTGRES_HOST=postgresql + volumes: + - freshrss-data:/var/www/FreshRSS/data + - freshrss-extensions:/var/www/FreshRSS/extensions + depends_on: + freshrss-db: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/80' || exit 1"] + interval: 5s + timeout: 20s + retries: 3 + + freshrss-db: + image: postgres:16 + volumes: + - freshrss-postgresql-data:/var/lib/postgresql/data + environment: + - POSTGRES_USER=${SERVICE_USER_POSTGRESQL} + - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} + - POSTGRES_DB=${POSTGRESQL_DATABASE:-freshrss} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 20s + retries: 10