version: '3.8'

services:
  backup-web-app:
    build: .
    container_name: backup-web-app
    ports:
      - "5000:5000"
    volumes:
      - /mnt/share/media/backups:/data/backups:ro
      - ./logs:/app/logs
    environment:
      - BACKUP_ROOT=/data/backups
      - FLASK_ENV=production
      - PORT=5000
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
