Files
strangler-fig-demo/docker-compose.yml
T
ehoandClaude Sonnet 5 a6a1abbe9c feat: implement strangler-fig-demo Session 1 (backend + smoke script)
Builds the four-seam, three-write-path reference demo backend: case-framework
(seam D stand-in), legacy-backend/frontend (SQL Server, seams A/B/C targets),
and new-backend (Domain/Application/Infrastructure.*/Api implementing the
source resolver, take/release-ownership, write-through translator, and owned
assessment flow), wired together via docker-compose with a plain placeholder
frontend standing in for the Angular portal until Session 2.

All 11 Architecture.Tests pass and scripts/smoke.sh passes end-to-end against
a fresh `docker compose up`, covering acceptance criteria 1-3 and 7-22.

Fixes two real domain bugs found only once the stack ran for real: the BSN
eleven-proof checksum trivially passes all-zero digits, and the adoption
mapper silently treated a partial legacy address as absent instead of failing
loudly. Also fixes several environment-specific integration issues (rootless
Podman/SELinux bind-mount permissions, a buildah NuGet layer-caching bug,
SqlClient's invariant-globalization incompatibility, and an nginx path-prefix
mismatch for the legacy frontend).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 07:57:26 +02:00

96 lines
2.6 KiB
YAML

services:
legacy-db:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD:-P@ssw0rd_Demo123}
MSSQL_PID: Developer
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -Q 'SELECT 1' || exit 1"]
interval: 10s
retries: 10
start_period: 60s
new-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: newdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
retries: 10
start_period: 10s
case-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: caseframeworkdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
retries: 10
start_period: 10s
case-framework:
build: ./case-framework
environment:
ConnectionStrings__CaseFramework: Host=case-db;Port=5432;Database=caseframeworkdb;Username=postgres;Password=postgres
ASPNETCORE_URLS: http://+:8080
depends_on:
case-db:
condition: service_healthy
legacy-backend:
build:
context: ./legacy
dockerfile: src/Legacy.Api/Dockerfile
environment:
ConnectionStrings__Legacy: Server=legacy-db,1433;Database=legacydb;User Id=sa;Password=${MSSQL_SA_PASSWORD:-P@ssw0rd_Demo123};TrustServerCertificate=True
ASPNETCORE_URLS: http://+:8080
depends_on:
legacy-db:
condition: service_healthy
legacy-frontend:
build:
context: ./legacy
dockerfile: src/Legacy.Web/Dockerfile
environment:
Services__LegacyApi__BaseUrl: http://legacy-backend:8080
ASPNETCORE_URLS: http://+:8080
depends_on:
- legacy-backend
new-backend:
build: ./new
environment:
ConnectionStrings__New: Host=new-db;Port=5432;Database=newdb;Username=postgres;Password=postgres
Services__LegacyBackend__BaseUrl: http://legacy-backend:8080
Services__CaseFramework__BaseUrl: http://case-framework:8080
ASPNETCORE_URLS: http://+:8080
depends_on:
new-db:
condition: service_healthy
legacy-backend:
condition: service_started
case-framework:
condition: service_started
new-frontend:
build: ./new-frontend
proxy:
image: nginx:alpine
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro,Z
ports:
- "8080:80"
depends_on:
- new-frontend
- new-backend
- legacy-frontend