b0996833bc
- Add HrynCo.NotificationService.Contracts project with SendEmailMessage and NotificationResultMessage - Add SendEmailConsumer (RabbitMQ worker) with reply-to pattern via CorrelationContext.ReplyTo - Add SendEmailHandler owning SMTP send + usage increment as business logic - Add GetChannelUsageSummaryHandler with single DB query via navigation property - Merge usage stats inline into channels list (daily/monthly with progress bars) - Refactor AdminChannelsController.Index to use GetChannelUsageSummaryQuery - Add RabbitMQ service to docker-compose files - Remove dead AdminChannelUsageController, ChannelUsageViewModel, ChannelUsageSummary Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: hrynco-notification-service
|
|
|
|
services:
|
|
migrator:
|
|
environment:
|
|
- App__ConnectionString=Host=db;Port=5432;Database=notification_service;Username=postgres;Password=postgres
|
|
|
|
api:
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Development
|
|
- App__ConnectionString=Host=db;Port=5432;Database=notification_service;Username=postgres;Password=postgres
|
|
- Serilog__WriteTo__1__Args__serverUrl=http://seq
|
|
ports:
|
|
- "5200:8080"
|
|
|
|
worker:
|
|
environment:
|
|
- DOTNET_ENVIRONMENT=Development
|
|
- App__ConnectionString=Host=db;Port=5432;Database=notification_service;Username=postgres;Password=postgres
|
|
- App__RabbitMq__Host=rabbitmq
|
|
- App__RabbitMq__User=guest
|
|
- App__RabbitMq__Password=guest
|
|
- Serilog__WriteTo__1__Args__serverUrl=http://seq
|
|
depends_on:
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
|
|
rabbitmq:
|
|
image: rabbitmq:4-management-alpine
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: guest
|
|
RABBITMQ_DEFAULT_PASS: guest
|
|
ports:
|
|
- "5672:5672"
|
|
- "15672:15672"
|
|
healthcheck:
|
|
test: ["CMD", "rabbitmq-diagnostics", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- notification_rabbitmq:/var/lib/rabbitmq
|
|
|
|
db:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_DB: notification_service
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- notification_db:/var/lib/postgresql/data
|
|
|
|
seq:
|
|
image: datalust/seq:2024
|
|
environment:
|
|
ACCEPT_EULA: "Y"
|
|
SEQ_FIRSTRUN_NOAUTHENTICATION: "true"
|
|
ports:
|
|
- "5342:80"
|
|
volumes:
|
|
- notification_seq:/data
|
|
|
|
volumes:
|
|
notification_db:
|
|
notification_seq:
|
|
notification_rabbitmq: |