Files
strangler-fig-demo/docker-compose.yml
T
eho 15b6397317 build: wire portal-frontend into proxy and docker-compose
Adds portal-frontend as a new service (no published port, only
reachable via the proxy, same as new-frontend) and two nginx location
blocks for /portal - a bare-path redirect plus the prefix-stripping
proxy_pass. The existing /, /legacy, and /api/ blocks are unchanged.

Verified end to end: /portal/, a deep link, and / all return 200
through the single published proxy port, and /api/worklist still
returns the full 17-item worklist.
2026-07-31 09:15:49 +02:00

100 lines
2.7 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
portal-frontend:
build: ./portal-frontend
proxy:
image: nginx:alpine
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro,Z
ports:
- "8080:80"
depends_on:
- new-frontend
- portal-frontend
- new-backend
- legacy-frontend