/
VFlov
/
NotificationService_1
Обзор
Документация
Войти
/
VFlov
/
NotificationService_1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
docker-compose.yml
167 строк
4 KB
VFlov
first_commit
27 ноя 2025, 11:43
27 ноя 2025, 11:43
819df67
Код
Авторство
О чём код?
services: # PostgreSQL Database postgres: image: postgres:16-alpine container_name: notification-postgres environment: POSTGRES_DB: notifications POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - "5432:5432" volumes: - postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 networks: - notification-network # RabbitMQ Message Broker rabbitmq: image: rabbitmq:3-management-alpine container_name: notification-rabbitmq environment: RABBITMQ_DEFAULT_USER: guest RABBITMQ_DEFAULT_PASS: guest ports: - "5672:5672" # AMQP port - "15672:15672" # Management UI volumes: - rabbitmq-data:/var/lib/rabbitmq healthcheck: test: ["CMD", "rabbitmq-diagnostics", "ping"] interval: 10s timeout: 5s retries: 5 networks: - notification-network # Notification Gateway API gateway: build: context: . dockerfile: docker/Dockerfile.gateway container_name: notification-gateway environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://+:8080 - Database__ConnectionString=Host=postgres;Port=5432;Database=notifications;Username=postgres;Password=postgres - RabbitMQ__ConnectionString=amqp://guest:guest@rabbitmq:5672 ports: - "5000:8080" depends_on: postgres: condition: service_healthy rabbitmq: condition: service_healthy networks: - notification-network restart: unless-stopped # Email Service email-service: build: context: . dockerfile: docker/Dockerfile.email environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://+:8080 - Database__ConnectionString=Host=postgres;Port=5432;Database=notifications;Username=postgres;Password=postgres - RabbitMQ__ConnectionString=amqp://guest:guest@rabbitmq:5672 - Environment=Development depends_on: postgres: condition: service_healthy rabbitmq: condition: service_healthy networks: - notification-network restart: unless-stopped deploy: replicas: 2 # SMS Service sms-service: build: context: . dockerfile: docker/Dockerfile.sms environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://+:8080 - Database__ConnectionString=Host=postgres;Port=5432;Database=notifications;Username=postgres;Password=postgres - RabbitMQ__ConnectionString=amqp://guest:guest@rabbitmq:5672 - Environment=Development depends_on: postgres: condition: service_healthy rabbitmq: condition: service_healthy networks: - notification-network restart: unless-stopped deploy: replicas: 2 # Push Service push-service: build: context: . dockerfile: docker/Dockerfile.push environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://+:8080 - Database__ConnectionString=Host=postgres;Port=5432;Database=notifications;Username=postgres;Password=postgres - RabbitMQ__ConnectionString=amqp://guest:guest@rabbitmq:5672 - Environment=Development depends_on: postgres: condition: service_healthy rabbitmq: condition: service_healthy networks: - notification-network restart: unless-stopped deploy: replicas: 2 # Prometheus для мониторинга prometheus: image: prom/prometheus:latest container_name: notification-prometheus ports: - "9090:9090" volumes: - ./docker/prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' networks: - notification-network # Grafana для визуализации grafana: image: grafana/grafana:latest container_name: notification-grafana ports: - "3000:3000" environment: - GF_SECURITY_ADMIN_PASSWORD=admin - GF_SECURITY_ADMIN_USER=admin volumes: - grafana-data:/var/lib/grafana networks: - notification-network volumes: postgres-data: rabbitmq-data: prometheus-data: grafana-data: networks: notification-network: driver: bridge