version: '3.8' services: unitune-api: build: . container_name: unitune-api restart: unless-stopped ports: - "10000:10000" env_file: - .env environment: - FLASK_ENV=production - LOG_LEVEL=ERROR - DATABASE_URL=postgresql+psycopg2://unitune:unitune@postgres:5432/unitune healthcheck: test: ["CMD", "curl", "-f", "http://localhost:10000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Optional: Add volume for logs # volumes: # - ./logs:/app/logs nginx: image: nginx:alpine container_name: unitune-nginx restart: unless-stopped ports: - "80:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - unitune-api postgres: image: postgres:16-alpine container_name: unitune-postgres restart: unless-stopped environment: - POSTGRES_DB=unitune - POSTGRES_USER=unitune - POSTGRES_PASSWORD=unitune volumes: - unitune-postgres-data:/var/lib/postgresql/data volumes: unitune-postgres-data: