Commit Graph

10 Commits

Author SHA1 Message Date
Anatolii Grynchuk 3e1cc696c1 fix: rename api service to web in all docker-compose files
- Aligns compose service name with the image name (hrynco.notification-service.web)
- Rename API_PORT env var to WEB_PORT for consistency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 18:50:16 +03:00
Anatolii Grynchuk c5528b253d fix: add internal network to migrator, api, worker services
- migrator, api, worker were missing 'networks: - internal'
- db and rabbitmq are only on internal network, so services couldn't reach them
- also changed api depends_on db condition to service_healthy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 18:31:34 +03:00
Anatolii Grynchuk 166b1a6103 fix: wait for postgres healthcheck before running migrator
- Add pg_isready healthcheck to db service (5s interval, 10 retries)
- Change migrator depends_on condition: service_started -> service_healthy
- Prevents migrator connection failure on fresh postgres startup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 16:38:09 +03:00
Anatolii Grynchuk ae119d1a3d feat: add production docker-compose with hrynco-services network
- Base compose: explicit internal network, named volumes with VOLUME_PREFIX
- docker-compose.prod.yml: production images, ports, restart policies, hrynco-services external network on rabbitmq
- docker-compose.Development.yml: cleaned up orphan volumes, named dev volumes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 15:25:09 +03:00
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
Anatolii Grynchuk d23717d123 fix: move api port mapping to dev override, fix Web Dockerfile project name
- Base compose has no ports (env overrides define them)
- Dev override maps api to 5200:8080
- Web Dockerfile updated to reference .Web project name

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 02:27:51 +03:00
Anatolii Grynchuk a8bc26fe38 feat: add Migrator console project
- Dedicated HrynCo.NotificationService.Migrator console app
- Reads App:ConnectionString from config/env
- Calls db.Database.MigrateAsync() with clear log output
- Own Dockerfile (runtime:10.0 base, no SDK overhead)
- Replaces SDK volume-mount approach in docker-compose
- Added to solution with /docker/Migrator/ folder

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 02:24:45 +03:00
Anatolii Grynchuk 2e6dacc3a2 feat: add docker migrator service following ItemTracker pattern
- migrations service uses mcr.microsoft.com/dotnet/sdk:10.0
- mounts source, installs dotnet-ef, retries until DB is ready
- api and worker depend on migrator completing successfully
- removed startup migration from Program.cs

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 02:16:47 +03:00
Anatolii Grynchuk ab44ad117c refactor: rename Api project to Web
- HrynCo.NotificationService.Api -> HrynCo.NotificationService.Web
- HrynCo.NotificationService.Api.IntegrationTests -> HrynCo.NotificationService.Web.IntegrationTests
- Updated slnx, docker-compose, project references, and namespaces
- Project serves both REST API and admin UI

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 01:55:57 +03:00
Anatolii Grynchuk ae724e4aee chore: add docker compose files and solution folder
- docker/environments/docker-compose.yml: base Api + Worker service definitions
- docker/environments/docker-compose.Development.yml: local PostgreSQL + Seq + port mappings
- Solution folder /docker/ in .slnx for IDE access

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 01:31:40 +03:00