version: '3.8' services: linkedin-posts: build: . container_name: linkedin-posts restart: unless-stopped ports: - "8001:8001" env_file: - .env environment: - PYTHONPATH=/app - PORT=8001 volumes: # Optional: Mount logs directory - ./logs:/app/logs healthcheck: test: ["CMD", "python", "-c", "import httpx; r = httpx.get('http://127.0.0.1:8001/health', timeout=5); raise SystemExit(0 if r.status_code == 200 else 1)"] interval: 30s timeout: 10s retries: 3 start_period: 10s # Optional: Nginx reverse proxy with SSL # Uncomment if you want to use Nginx # nginx: # image: nginx:alpine # container_name: linkedin-posts-nginx # restart: unless-stopped # ports: # - "80:80" # - "443:443" # volumes: # - ./nginx.conf:/etc/nginx/nginx.conf:ro # - ./ssl:/etc/nginx/ssl:ro # depends_on: # - linkedin-posts