Fix docker-compose: use init script for multi-DB setup, fix build context paths

- Postgres init: mount docker-init-db.sh to create per-product databases and run migrations
- Fix build contexts: relative to products/ dir (compose lives in products/)
This commit is contained in:
2026-03-01 05:59:27 +00:00
parent 3fe0b344bc
commit 2b86abc18d

View File

@@ -15,12 +15,11 @@ services:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
- ./products/01-llm-cost-router/migrations:/docker-entrypoint-initdb.d/01-route:ro
- ./products/02-iac-drift-detection/saas/migrations:/docker-entrypoint-initdb.d/02-drift:ro
- ./products/03-alert-intelligence/migrations:/docker-entrypoint-initdb.d/03-alert:ro
- ./products/04-lightweight-idp/migrations:/docker-entrypoint-initdb.d/04-portal:ro
- ./products/05-aws-cost-anomaly/migrations:/docker-entrypoint-initdb.d/05-cost:ro
- ./products/06-runbook-automation/saas/migrations:/docker-entrypoint-initdb.d/06-run:ro
- ./docker-init-db.sh:/docker-entrypoint-initdb.d/01-init-db.sh:ro
- ./03-alert-intelligence/migrations:/migrations/03-alert:ro
- ./04-lightweight-idp/migrations:/migrations/04-portal:ro
- ./05-aws-cost-anomaly/migrations:/migrations/05-cost:ro
- ./06-runbook-automation/saas/migrations:/migrations/06-run:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dd0c"]
interval: 5s
@@ -50,7 +49,7 @@ services:
# P3: Alert Intelligence
alert:
build:
context: ./products/03-alert-intelligence
context: ./03-alert-intelligence
dockerfile: Dockerfile
ports:
- "3003:3000"
@@ -67,7 +66,7 @@ services:
# P4: Lightweight IDP / Service Catalog
portal:
build:
context: ./products/04-lightweight-idp
context: ./04-lightweight-idp
dockerfile: Dockerfile
ports:
- "3004:3000"
@@ -86,7 +85,7 @@ services:
# P5: AWS Cost Anomaly Detection
cost:
build:
context: ./products/05-aws-cost-anomaly
context: ./05-aws-cost-anomaly
dockerfile: Dockerfile
ports:
- "3005:3000"
@@ -104,7 +103,7 @@ services:
# P6: Runbook Automation (SaaS)
run:
build:
context: ./products/06-runbook-automation/saas
context: ./06-runbook-automation/saas
dockerfile: Dockerfile
ports:
- "3006:3000"