Files
Anatolii Grynchuk b0996833bc feat: add RabbitMQ worker, contracts, usage UI in channels screen
- 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>
2026-05-02 14:00:58 +03:00

55 lines
1.4 KiB
YAML

name: hrynco-notification-service
services:
migrator:
build:
context: ../..
dockerfile: HrynCo.NotificationService.Migrator/Dockerfile
environment:
- App__ConnectionString=${CONNECTION_STRING}
depends_on:
db:
condition: service_started
restart: "no"
api:
build:
context: ../..
dockerfile: HrynCo.NotificationService.Web/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Production
- App__ConnectionString=${CONNECTION_STRING}
depends_on:
db:
condition: service_started
migrator:
condition: service_completed_successfully
worker:
build:
context: ../..
dockerfile: HrynCo.NotificationService.Worker/Dockerfile
environment:
- DOTNET_ENVIRONMENT=Production
- App__ConnectionString=${CONNECTION_STRING}
- App__RabbitMq__Host=rabbitmq
- App__RabbitMq__User=${RABBITMQ_USER:-guest}
- App__RabbitMq__Password=${RABBITMQ_PASSWORD:-guest}
depends_on:
db:
condition: service_started
migrator:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:4-management-alpine
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER:-guest}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD:-guest}
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 10s
timeout: 5s
retries: 5