# docker/docker-compose.yml services: # ================== Кластер EventHub ================== eventhub-node1: build: context: .. dockerfile: docker/Dockerfile hostname: eventhub-node1.local environment: - NODE_NAME=eventhub-node1@eventhub-node1.local - RELEASE_COOKIE=${RELEASE_COOKIE} - JWT_SECRET=${JWT_SECRET} - JOIN_NODES=eventhub-node1@eventhub-node1.local,eventhub-node2@eventhub-node2.local,eventhub-node3@eventhub-node3.local networks: - eventhub-net volumes: - eventhub-node1-data:/app/data ports: - "8080:8080" # REST API - "8081:8081" # WebSocket - "8445:8445" # Admin REST - "8446:8446" # Admin WebSocket restart: unless-stopped eventhub-node2: build: context: .. dockerfile: docker/Dockerfile hostname: eventhub-node2.local environment: - NODE_NAME=eventhub-node2@eventhub-node2.local - RELEASE_COOKIE=${RELEASE_COOKIE} - JWT_SECRET=${JWT_SECRET} - JOIN_NODES=eventhub-node1@eventhub-node1.local,eventhub-node2@eventhub-node2.local,eventhub-node3@eventhub-node3.local networks: - eventhub-net volumes: - eventhub-node2-data:/app/data ports: - "8082:8080" - "8083:8081" - "9445:8445" - "9446:8446" restart: unless-stopped eventhub-node3: build: context: .. dockerfile: docker/Dockerfile hostname: eventhub-node3.local environment: - NODE_NAME=eventhub-node3@eventhub-node3.local - RELEASE_COOKIE=${RELEASE_COOKIE} - JWT_SECRET=${JWT_SECRET} - JOIN_NODES=eventhub-node1@eventhub-node1.local,eventhub-node2@eventhub-node2.local,eventhub-node3@eventhub-node3.local networks: - eventhub-net volumes: - eventhub-node3-data:/app/data ports: - "8084:8080" - "8085:8081" - "11445:8445" - "11446:8446" restart: unless-stopped # ================== Мониторинг ================== prometheus: image: prom/prometheus:latest volumes: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus networks: - eventhub-net ports: - "9090:9090" restart: unless-stopped grafana: image: grafana/grafana:latest environment: - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD} volumes: - ./grafana/provisioning:/etc/grafana/provisioning - grafana-data:/var/lib/grafana networks: - eventhub-net ports: - "3000:3000" restart: unless-stopped # ================== Инструмент отладки ================== observer_web: build: context: .. dockerfile: docker/ObserverWeb.Dockerfile environment: - RELEASE_COOKIE=${RELEASE_COOKIE} networks: - eventhub-net ports: - "4000:4000" restart: unless-stopped # ================== Сети и тома ================== networks: eventhub-net: driver: bridge volumes: eventhub-node1-data: eventhub-node2-data: eventhub-node3-data: prometheus-data: grafana-data: