2026-03-01 03:10:35 +00:00
|
|
|
# dd0c Local Development Stack
|
|
|
|
|
#
|
|
|
|
|
# Usage: docker compose up -d
|
|
|
|
|
# All services share one Postgres and one Redis instance.
|
|
|
|
|
# Caddy handles TLS and routing for *.dd0c.localhost
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
# --- Shared Infrastructure ---
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: dd0c
|
|
|
|
|
POSTGRES_PASSWORD: dd0c-dev
|
|
|
|
|
ports:
|
2026-03-01 20:34:49 +00:00
|
|
|
- "5433:5432"
|
2026-03-01 03:10:35 +00:00
|
|
|
volumes:
|
|
|
|
|
- pg_data:/var/lib/postgresql/data
|
2026-03-01 05:59:27 +00:00
|
|
|
- ./docker-init-db.sh:/docker-entrypoint-initdb.d/01-init-db.sh:ro
|
2026-03-01 06:11:20 +00:00
|
|
|
- ./01-llm-cost-router/migrations:/migrations/01-route:ro
|
|
|
|
|
- ./02-iac-drift-detection/saas/migrations:/migrations/02-drift:ro
|
2026-03-01 05:59:27 +00:00
|
|
|
- ./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
|
2026-03-01 03:10:35 +00:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U dd0c"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
meilisearch:
|
|
|
|
|
image: getmeili/meilisearch:v1.8
|
|
|
|
|
environment:
|
|
|
|
|
MEILI_ENV: development
|
|
|
|
|
ports:
|
|
|
|
|
- "7700:7700"
|
|
|
|
|
volumes:
|
|
|
|
|
- meili_data:/meili_data
|
|
|
|
|
|
2026-03-02 05:15:37 +00:00
|
|
|
# --- Local Docker Registry ---
|
|
|
|
|
registry:
|
|
|
|
|
image: registry:2
|
|
|
|
|
ports:
|
|
|
|
|
- "5000:5000"
|
|
|
|
|
volumes:
|
|
|
|
|
- registry_data:/var/lib/registry
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-03-01 03:10:35 +00:00
|
|
|
# --- dd0c Products ---
|
2026-03-01 06:11:20 +00:00
|
|
|
# P1: LLM Cost Router (Rust — API server)
|
2026-03-01 19:15:49 +00:00
|
|
|
# NOTE: Rust services are behind the "rust" profile because they take 10+ min to compile.
|
|
|
|
|
# Start without Rust: docker compose up -d
|
|
|
|
|
# Start with Rust: docker compose --profile rust up -d
|
2026-03-01 06:11:20 +00:00
|
|
|
route-api:
|
2026-03-01 19:15:49 +00:00
|
|
|
profiles: ["rust"]
|
2026-03-01 06:11:20 +00:00
|
|
|
build:
|
|
|
|
|
context: ./01-llm-cost-router
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
command: ["dd0c-api"]
|
|
|
|
|
ports:
|
|
|
|
|
- "3001:3000"
|
|
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 06:11:20 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_route
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
# P1: LLM Cost Router (Rust — proxy)
|
|
|
|
|
route-proxy:
|
2026-03-01 19:15:49 +00:00
|
|
|
profiles: ["rust"]
|
2026-03-01 06:11:20 +00:00
|
|
|
build:
|
|
|
|
|
context: ./01-llm-cost-router
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
command: ["dd0c-proxy"]
|
|
|
|
|
ports:
|
|
|
|
|
- "8080:8080"
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_route
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
# P1: LLM Cost Router (Rust — worker)
|
|
|
|
|
route-worker:
|
2026-03-01 19:15:49 +00:00
|
|
|
profiles: ["rust"]
|
2026-03-01 06:11:20 +00:00
|
|
|
build:
|
|
|
|
|
context: ./01-llm-cost-router
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
command: ["dd0c-worker"]
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_route
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
# P2: IaC Drift Detection (SaaS)
|
|
|
|
|
drift:
|
2026-03-02 05:15:37 +00:00
|
|
|
image: localhost:5000/dd0c-drift:latest
|
2026-03-02 05:21:33 +00:00
|
|
|
build:
|
|
|
|
|
context: ./02-iac-drift-detection/saas
|
|
|
|
|
dockerfile: Dockerfile
|
2026-03-01 06:11:20 +00:00
|
|
|
ports:
|
|
|
|
|
- "3002:3000"
|
|
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 06:11:20 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_drift
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
2026-03-01 03:10:35 +00:00
|
|
|
# P3: Alert Intelligence
|
|
|
|
|
alert:
|
2026-03-02 05:15:37 +00:00
|
|
|
image: localhost:5000/dd0c-alert:latest
|
2026-03-02 05:21:33 +00:00
|
|
|
build:
|
|
|
|
|
context: ./03-alert-intelligence
|
|
|
|
|
dockerfile: Dockerfile
|
2026-03-01 03:10:35 +00:00
|
|
|
ports:
|
|
|
|
|
- "3003:3000"
|
|
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 03:10:35 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_alert
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
# P4: Lightweight IDP / Service Catalog
|
|
|
|
|
portal:
|
2026-03-02 05:15:37 +00:00
|
|
|
image: localhost:5000/dd0c-portal:latest
|
2026-03-02 05:21:33 +00:00
|
|
|
build:
|
|
|
|
|
context: ./04-lightweight-idp
|
|
|
|
|
dockerfile: Dockerfile
|
2026-03-01 03:10:35 +00:00
|
|
|
ports:
|
|
|
|
|
- "3004:3000"
|
|
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 03:10:35 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_portal
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
MEILI_URL: http://meilisearch:7700
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
meilisearch: { condition: service_started }
|
|
|
|
|
|
|
|
|
|
# P5: AWS Cost Anomaly Detection
|
|
|
|
|
cost:
|
2026-03-02 05:15:37 +00:00
|
|
|
image: localhost:5000/dd0c-cost:latest
|
2026-03-02 05:21:33 +00:00
|
|
|
build:
|
|
|
|
|
context: ./05-aws-cost-anomaly
|
|
|
|
|
dockerfile: Dockerfile
|
2026-03-01 03:10:35 +00:00
|
|
|
ports:
|
2026-03-01 19:07:52 +00:00
|
|
|
- "3007:3000"
|
2026-03-01 03:10:35 +00:00
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 03:10:35 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_cost
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
ANOMALY_THRESHOLD: "50"
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
# P6: Runbook Automation (SaaS)
|
|
|
|
|
run:
|
2026-03-02 05:15:37 +00:00
|
|
|
image: localhost:5000/dd0c-run:latest
|
2026-03-02 05:21:33 +00:00
|
|
|
build:
|
|
|
|
|
context: ./06-runbook-automation/saas
|
|
|
|
|
dockerfile: Dockerfile
|
2026-03-01 03:10:35 +00:00
|
|
|
ports:
|
|
|
|
|
- "3006:3000"
|
|
|
|
|
environment:
|
2026-03-01 20:41:47 +00:00
|
|
|
NODE_ENV: production
|
2026-03-01 03:10:35 +00:00
|
|
|
PORT: "3000"
|
|
|
|
|
DATABASE_URL: postgresql://dd0c:dd0c-dev@postgres:5432/dd0c_run
|
|
|
|
|
REDIS_URL: redis://redis:6379
|
|
|
|
|
JWT_SECRET: dev-secret-change-me-in-production!!
|
|
|
|
|
LOG_LEVEL: info
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres: { condition: service_healthy }
|
|
|
|
|
redis: { condition: service_healthy }
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pg_data:
|
|
|
|
|
meili_data:
|
2026-03-02 05:15:37 +00:00
|
|
|
registry_data:
|