Files
captions-deploy/docker-compose.prod.yml

108 lines
2.8 KiB
YAML

version: "3.8"
services:
caption-local:
build:
context: ./caption-local
dockerfile: Dockerfile
ports:
- "8765:8765"
volumes:
- caption-local-cache:/app/cache
environment:
- PYTHONUNBUFFERED=1
networks:
- caption
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8765/health"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.caption-local.rule=Host(`caption.local.yourdomain.com`)"
- "traefik.http.routers.caption-local.entrypoints=websecure"
- "traefik.http.services.caption-local.loadbalancer.server.port=8765"
captionninja-relay:
build:
context: ./captionninja/relay
dockerfile: Dockerfile
ports:
- "127.0.0.1:8787:8787"
environment:
- PORT=8787
- HOST=0.0.0.0
- CAPTION_RELAY_CONFIG=/run/rooms.json
volumes:
- ${CAPTION_RELAY_CONFIG:-./captionninja/relay/.caption-ninja-relay.private.json}:/run/rooms.json:ro
networks:
- caption
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8787/health"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.relay.rule=Host(`relay.yourdomain.com`)"
- "traefik.http.routers.relay.entrypoints=websecure"
- "traefik.http.services.relay.loadbalancer.server.port=8787"
captionninja-web:
image: nginx:alpine
ports:
- "8080:80"
volumes:
- ./captionninja:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- caption
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.webui.rule=Host(`ui.yourdomain.com`)"
- "traefik.http.routers.webui.entrypoints=websecure"
- "traefik.http.services.webui.loadbalancer.server.port=80"
traefik:
image: traefik:v2.11
command:
- "--configFile=/etc/traefik/traefik.yml"
ports:
- "80:80"
- "443:443"
volumes:
- "./traefik.yml:/etc/traefik/traefik.yml:ro"
- "letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
environment:
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
restart: unless-stopped
networks:
- caption
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ping"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
networks:
caption:
external: false
volumes:
caption-local-cache:
letsencrypt: