Spaces:
Configuration error
Configuration error
| version: '3.8' | |
| # Production overrides for docker-compose.yml | |
| # Usage: docker-compose -f docker-compose.yml -f docker-compose.production.yml up | |
| services: | |
| server: | |
| # Production-specific configurations | |
| environment: | |
| - OPENPOKE_CORS_ALLOW_ORIGINS=${PRODUCTION_CORS_ORIGINS:-https://yourdomain.com} | |
| - OPENPOKE_ENABLE_DOCS=0 # Disable docs in production | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '1.0' | |
| memory: 1G | |
| reservations: | |
| cpus: '0.5' | |
| memory: 512M | |
| restart_policy: | |
| condition: on-failure | |
| delay: 5s | |
| max_attempts: 3 | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: "50m" | |
| max-file: "5" | |
| web: | |
| # Production-specific configurations | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '0.5' | |
| memory: 512M | |
| reservations: | |
| cpus: '0.25' | |
| memory: 256M | |
| restart_policy: | |
| condition: on-failure | |
| delay: 5s | |
| max_attempts: 3 | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: "50m" | |
| max-file: "5" | |
| # Optional: Add SSL termination with Traefik | |
| # traefik: | |
| # image: traefik:v2.10 | |
| # command: | |
| # - "--api.dashboard=true" | |
| # - "--providers.docker=true" | |
| # - "--providers.docker.exposedbydefault=false" | |
| # - "--entrypoints.web.address=:80" | |
| # - "--entrypoints.websecure.address=:443" | |
| # - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true" | |
| # - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web" | |
| # - "--certificatesresolvers.letsencrypt.acme.email=your-email@example.com" | |
| # - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json" | |
| # ports: | |
| # - "80:80" | |
| # - "443:443" | |
| # - "8080:8080" # Traefik dashboard | |
| # volumes: | |
| # - /var/run/docker.sock:/var/run/docker.sock:ro | |
| # - letsencrypt:/letsencrypt | |
| # networks: | |
| # - app-network | |
| # labels: | |
| # - "traefik.enable=true" | |
| # - "traefik.http.routers.api.rule=Host(`traefik.yourdomain.com`)" | |
| # - "traefik.http.routers.api.service=api@internal" | |
| # volumes: | |
| # letsencrypt: | |
| # driver: local |