version: '3.8' services: backend: build: . container_name: living-lore-backend ports: - "8000:8000" env_file: - .env environment: - HOST=0.0.0.0 - PORT=8000 restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: # Optional: mount for persistent data if needed - ./data:/app/data networks: - living-lore-network # Optional: Redis for caching (uncomment if needed) # redis: # image: redis:7-alpine # container_name: living-lore-redis # ports: # - "6379:6379" # restart: unless-stopped # networks: # - living-lore-network # Optional: Nginx reverse proxy (uncomment for production) # nginx: # image: nginx:alpine # container_name: living-lore-nginx # ports: # - "80:80" # - "443:443" # volumes: # - ./nginx.conf:/etc/nginx/nginx.conf:ro # - ./ssl:/etc/nginx/ssl:ro # depends_on: # - backend # restart: unless-stopped # networks: # - living-lore-network networks: living-lore-network: driver: bridge volumes: data: