services:
  vikunja:
    container_name: vikunja
    image: vikunja/vikunja
    environment:
#      VIKUNJA_SERVICE_PUBLICURL: https://tasks.ccalifice.com
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: ejcurt!898f!
      VIKUNJA_DATABASE_TYPE: postgres
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_SERVICE_JWTSECRET: 4ab3fe5084fb63e68ecdac256e789be0124e1c6652aaeaa663d92bd3bfeb2a8eb1052740b132b5b9b6ae84b53fbd68e45bf4721e24faf75bb5f1cfb267eb04da
    ports:
      - 3456:3456
    volumes:
      - /home/ccalifice/docker-data/vikunja/files:/app/vikunja/files
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped
    networks:
      - caddy-net
      - vikunja
  db:
    container_name: vikunja-db
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: ejcurt!898f!
      POSTGRES_USER: vikunja
    volumes:
      - /home/ccalifice/docker-data/vikunja/db:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -h localhost -U $$POSTGRES_USER"]
      interval: 2s
    networks:
    - vikunja



networks:
  caddy-net:
    external: true
    name: caddy-net
  vikunja:
