Files
EventHubBack/docker/docker-compose.stage.yml
T
aleksey f79264ece9
CI / test (push) Successful in 10m55s
Co-authored-by:
2026-07-11 14:33:53 +03:00

90 lines
2.5 KiB
YAML

version: "3.8"
services:
# ================== Балансировщик ==================
traefik:
image: traefik:latest
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- eventhub-net
deploy:
task-history-limit: 1
replicas: 1
restart_policy:
condition: any
# ================== Кластер EventHub ==================
eventhub:
image: git.sabilin.com/eventhub/eventhub:stage
hostname: "eventhub-node{{.Task.Slot}}"
environment:
- EVENTHUB_ENV=stage
- NODE_NAME=eventhub-node{{.Task.Slot}}
- RELEASE_COOKIE=${RELEASE_COOKIE}
- JWT_SECRET=${JWT_SECRET}
- ADMIN_JWT_SECRET=${ADMIN_JWT_SECRET}
- ADMIN_SUPER_EMAIL=${ADMIN_SUPER_EMAIL}
- ADMIN_SUPER_PASSWORD=${ADMIN_SUPER_PASSWORD}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_MODER_EMAIL=${ADMIN_MODER_EMAIL}
- ADMIN_MODER_PASSWORD=${ADMIN_MODER_PASSWORD}
- ADMIN_SUPPORT_EMAIL=${ADMIN_SUPPORT_EMAIL}
- ADMIN_SUPPORT_PASSWORD=${ADMIN_SUPPORT_PASSWORD}
- CLUSTER_MODE=true
- DNS_NAME=eventhub-node
networks:
eventhub-net:
aliases:
- eventhub-node
volumes:
- eventhub-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
deploy:
task-history-limit: 1
replicas: 1
endpoint_mode: dnsrr
restart_policy:
condition: any
# ================== Эмулятор ботов ==================
bot-emulator-users:
image: git.sabilin.com/eventhub/bot-emulator-users:stage
environment:
- ADMIN_API_HOST=http://eventhub-node:8445
- CLIENT_API_HOST=http://eventhub-node:8080
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- BOT_PASSWORD=${BOT_PASSWORD}
- STARTUP_DELAY=30
- DEBUG=true
networks:
- eventhub-net
depends_on:
- eventhub
deploy:
task-history-limit: 1
replicas: 0
restart_policy:
condition: any
networks:
eventhub-net:
driver: overlay
volumes:
eventhub-data: