services:
  anl-backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    container_name: anl-backend-api
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - HOST=0.0.0.0
      - PORT=8080
      - DB_PATH=/app/data/anl.db
      - GIN_MODE=release
      - CORS_ALLOW_ORIGINS=*
      - AUTO_MIGRATE=true
    volumes:
      - anl-db-data:/app/data
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/health"]
      interval: 30s
      timeout: 3s
      retries: 3

volumes:
  anl-db-data:
    name: anl-sqlite-storage
