Merge pull request #2817 from luckydonald/patch-2

[TEMPLATE] fix vikunja, add postgres variant.
This commit is contained in:
Andras Bacsai 2024-07-15 12:18:21 +02:00 committed by GitHub
commit e1d802b507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 44 additions and 0 deletions

View File

@ -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

View File

@ -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