services:
  web:
    build:
      context: .
      secrets:
        - FLUXON_KEY_FINGERPRINT
        - FLUXON_LICENSE_KEY
    image: fullyforged/music_library:latest
    init: true
    ports:
      - 8080
    environment:
      - API_TOKEN
      - BACKGROUND_DATABASE_PATH
      - CLOAK_ENCRIPTION_KEY
      - DATABASE_PATH
      - DISCOGS_PERSONAL_ACCESS_TOKEN
      - LAST_FM_API_KEY
      - LAST_FM_SHARED_SECRET
      - LAST_FM_USER
      - LOGIN_PASSWORD
      - MIX_ENV
      - OPENAI_KEY
      - POOL_SIZE
      - PORT
      - SECRET_KEY_BASE
      - TELEMETRY_DATABASE_PATH
      - TIMEZONE
    volumes:
      - /data/coolify/applications/music-library:/mnt/music_library
    healthcheck:
      test: ["CMD-SHELL", "bin/music_library pid"]
      interval: 10s
      timeout: 20s
      retries: 10
secrets:
  FLUXON_KEY_FINGERPRINT:
    environment: FLUXON_KEY_FINGERPRINT
  FLUXON_LICENSE_KEY:
    environment: FLUXON_LICENSE_KEY
