version: '3.8' services: automotive-api: build: . container_name: automotive-sales-prediction ports: - "8080:8080" environment: - FLASK_ENV=production - PYTHONPATH=/app volumes: - ./models:/app/models:ro - ./data:/app/data:ro restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Nginx reverse proxy (isteğe bağlı) nginx: image: nginx:alpine container_name: automotive-nginx ports: - "80:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - automotive-api restart: unless-stopped profiles: - "with-nginx"