secrets:
  vikunja_jwt_secret:
    file: ${SERVICE_PATH}/vikunja/secrets/vikunja_jwt_secret.txt
services:
  vikunja:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    image: vikunja/vikunja:1.1.0
    container_name: vikunja
    secrets: [vikunja_jwt_secret]
    environment:
      VIKUNJA_DATABASE_HOST: postgres
      VIKUNJA_DATABASE_PASSWORD: ${VIKUNJA_DATABASE_PASSWORD}
      VIKUNJA_DATABASE_TYPE: postgres
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_SERVICE_JWTSECRET: /run/secrets/vikunja_jwt_secret
      VIKUNJA_SERVICE_PUBLICURL: https://vikunja.${PUBLIC_DOMAIN}
    networks:
      - ip6net
    volumes:
      - ${SERVICE_PATH}/vikunja/data:/app/vikunja/files
      - ${SERVICE_PATH}/vikunja/config:/etc/vikunja
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.vikunja.rule=Host(`vikunja.${PUBLIC_DOMAIN}`)"
      - "traefik.http.routers.vikunja.entrypoints=https"
      - "traefik.http.routers.vikunja.tls=true"
