version: '3.8'
services:
  subscribarr:
    build: .
    container_name: subscribarr
    ports:
      - "8081:8000"
    environment:
      # Django
      - DJANGO_DEBUG=true
      - DJANGO_ALLOWED_HOSTS=*
      - DJANGO_SECRET_KEY=change-me
      - DB_PATH=/app/data/db.sqlite3
      - NOTIFICATIONS_ALLOW_DUPLICATES=false
      - DJANGO_CSRF_TRUSTED_ORIGINS="https://subscribarr.example.com,https://app.example.org"
      # App Settings (optional, otherwise use first-run setup)
      #- JELLYFIN_URL=
      #- JELLYFIN_API_KEY=
      #- SONARR_URL=
      #- SONARR_API_KEY=
      #- RADARR_URL=
      #- RADARR_API_KEY=
      #- MAIL_HOST=
      #- MAIL_PORT=
      #- MAIL_SECURE=
      #- MAIL_USER=
      #- MAIL_PASSWORD=
      #- MAIL_FROM=
      # Admin bootstrap (optional)
      #- ADMIN_USERNAME=
      #- ADMIN_PASSWORD=
      #- ADMIN_EMAIL=
      # Cron schedule (default every 30min)
      - CRON_SCHEDULE=*/30 * * * *
    volumes:
      - subscribarr-data:/app/data
    restart: unless-stopped

volumes:
  subscribarr-data:
