From 852e906736896d00793ea7d9d0272f53cfc76adb Mon Sep 17 00:00:00 2001 From: Luckydonald <2737108+luckydonald@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:55:37 +0200 Subject: [PATCH 1/2] Update vikunja.yaml, follow recommended docker-compose. --- templates/compose/vikunja.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/compose/vikunja.yaml b/templates/compose/vikunja.yaml index fd832dd66..b8a1d13a1 100644 --- a/templates/compose/vikunja.yaml +++ b/templates/compose/vikunja.yaml @@ -12,8 +12,10 @@ services: - VIKUNJA_SERVICE_PUBLICURL=$SERVICE_FQDN_VIKUNJA - VIKUNJA_SERVICE_JWTSECRET=$SERVICE_PASSWORD_JWTSECRET - VIKUNJA_SERVICE_ENABLEREGISTRATION=true + - VIKUNJA_DATABASE_PATH=/db/vikunja.db volumes: - vikunja-data:/app/vikunja/ + - vikunja-sqlite-data:/db healthcheck: test: ["CMD", "wget", "--spider", "http://127.0.0.1:3456"] interval: 5s From 7de2b8cbd735e10b29c4b568d14db2ee9b1a93e7 Mon Sep 17 00:00:00 2001 From: Luckydonald <2737108+luckydonald@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:58:14 +0200 Subject: [PATCH 2/2] Create vikunja-with-postgres.yaml to have a db variant. --- templates/compose/vikunja-with-postgres.yaml | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 templates/compose/vikunja-with-postgres.yaml diff --git a/templates/compose/vikunja-with-postgres.yaml b/templates/compose/vikunja-with-postgres.yaml new file mode 100644 index 000000000..085b46b9b --- /dev/null +++ b/templates/compose/vikunja-with-postgres.yaml @@ -0,0 +1,42 @@ +# documentation: https://vikunja.io +# slogan: The open-source, self-hostable to-do app. Organize everything, on all platforms. +# tags: productivity,todo +# logo: svgs/vikunja.svg +# port: 3456 + +services: + postgresql: + image: postgres:16-alpine + volumes: + - vikunja-postgresql-data:/var/lib/postgresql/data + environment: + - POSTGRES_USER=${SERVICE_USER_POSTGRESQL} + - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} + - POSTGRES_DB=${POSTGRESQL_DATABASE} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 20s + retries: 10 + vikunja: + image: vikunja/vikunja + environment: + - SERVICE_FQDN_VIKUNJA + - VIKUNJA_SERVICE_PUBLICURL=$SERVICE_FQDN_VIKUNJA + - VIKUNJA_SERVICE_JWTSECRET=$SERVICE_PASSWORD_JWTSECRET + - VIKUNJA_SERVICE_ENABLEREGISTRATION=true + - VIKUNJA_DATABASE_TYPE=postgres + - VIKUNJA_DATABASE_HOST=postgresql + - VIKUNJA_DATABASE_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL} + - VIKUNJA_DATABASE_USER=${SERVICE_USER_POSTGRESQL} + - VIKUNJA_DATABASE_DATABASE=${POSTGRESQL_DATABASE} + volumes: + - vikunja-data:/app/vikunja/ + depends_on: + postgresql: + condition: service_healthy + healthcheck: + test: ["CMD", "wget", "--spider", "http://127.0.0.1:3456"] + interval: 5s + timeout: 20s + retries: 10