Spaces:
Sleeping
Sleeping
| version: '3.8' | |
| services: | |
| central: | |
| build: . | |
| container_name: translator-central | |
| ports: | |
| - "7860:7860" | |
| environment: | |
| - NODE_ENV=production | |
| - PORT=7860 | |
| - ADMIN_ACCESS_CODE=${ADMIN_ACCESS_CODE} | |
| - TAILSCALE_API_KEY=${TAILSCALE_API_KEY} | |
| volumes: | |
| - ./central/logs:/app/central/logs | |
| restart: unless-stopped | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '1.5' | |
| memory: 12G | |
| reservations: | |
| cpus: '1' | |
| memory: 8G | |
| healthcheck: | |
| test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7860/api/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 10s | |
| worker: | |
| build: . | |
| container_name: translator-worker | |
| command: node worker/src/index.js | |
| environment: | |
| - NODE_ENV=production | |
| - CENTRAL_HOST=central | |
| - CENTRAL_PORT=7860 | |
| depends_on: | |
| central: | |
| condition: service_healthy | |
| volumes: | |
| - ./worker/logs:/app/worker/logs | |
| restart: unless-stopped | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '0.5' | |
| memory: 4G | |
| reservations: | |
| cpus: '0.25' | |
| memory: 2G | |
| networks: | |
| default: | |
| name: translator-network |