a8bc26fe38
- 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>
39 lines
972 B
YAML
39 lines
972 B
YAML
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}
|
|
ports:
|
|
- "8080:8080"
|
|
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}
|
|
depends_on:
|
|
db:
|
|
condition: service_started
|
|
migrator:
|
|
condition: service_completed_successfully |