CI/CD пайплайн

This commit is contained in:
2026-06-05 20:54:33 +03:00
parent 732e7c81b4
commit 38a299e5b9
5 changed files with 197 additions and 10 deletions
+81
View File
@@ -0,0 +1,81 @@
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:
replicas: 1
restart_policy:
condition: any
# ================== Кластер EventHub ==================
eventhub:
image: git.sabilin.com/eventhub/eventhub:stage
hostname: "eventhub-node{{.Task.Slot}}"
environment:
- NODE_NAME=eventhub-node{{.Task.Slot}}
- RELEASE_COOKIE=${RELEASE_COOKIE}
- JWT_SECRET=${JWT_SECRET}
- ADMIN_SUPER_EMAIL=${ADMIN_SUPER_EMAIL}
- ADMIN_SUPER_PASSWORD=${ADMIN_SUPER_PASSWORD}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASSWORD=${ADMIN_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:
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:
replicas: 0
restart_policy:
condition: any
networks:
eventhub-net:
driver: overlay
volumes:
eventhub-data: