# documentation: https://vikunja.io
# slogan: The open-source, self-hostable to-do app. Organize everything, on all platforms.
# category: productivity
# tags: productivity,todo
# logo: svgs/vikunja.svg
# port: 3456

services:
  vikunja:
    image: vikunja/vikunja
    environment:
      - SERVICE_URL_VIKUNJA
      - VIKUNJA_SERVICE_PUBLICURL=$SERVICE_URL_VIKUNJA
      - VIKUNJA_SERVICE_JWTSECRET=$SERVICE_PASSWORD_JWTSECRET
      - VIKUNJA_SERVICE_ENABLEREGISTRATION=true
      - VIKUNJA_DATABASE_PATH=/db/vikunja.db
      - VIKUNJA_DATABASE_TYPE=sqlite
    volumes:
      - vikunja-data:/app/vikunja/
      - vikunja-sqlite-data:/db
    depends_on:
      - init
  init:
    image: busybox
    restart: no
    volumes:
      - vikunja-sqlite-data:/db
    command: ["sh", "-c", "touch /db/vikunja.db && chown -R 1000 /db"]
