version: "3.8"

services:
  parentzone-downloader:
    build: .
    container_name: parentzone-downloader
    environment:
      # Optional: Set these if you want to use direct authentication
      # instead of or in addition to config.json
      - API_KEY=${API_KEY:-}
      - EMAIL=${EMAIL:-}
      - PASSWORD=${PASSWORD:-}
      # Timezone for cron scheduling
      - TZ=${TZ:-UTC}
    volumes:
      # Persistent storage for snapshots and logs
      - ./snapshots:/app/snapshots
      - ./logs:/app/logs
      # Mount your config file
      - ./config.json:/app/config.json:ro
    ports:
      - "8080:8080"
    restart: unless-stopped

volumes:
  snapshots:
    driver: local
  logs:
    driver: local
