38 lines
882 B
YAML
38 lines
882 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
linkedin-posts:
|
|
build: .
|
|
container_name: linkedin-posts
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PYTHONPATH=/app
|
|
volumes:
|
|
# Optional: Mount logs directory
|
|
- ./logs:/app/logs
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/login', timeout=5)"]
|
|
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
|