124 lines
3.5 KiB
YAML
124 lines
3.5 KiB
YAML
|
|
# 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:
|
||
|
|
- "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
|
||
|
|
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
|
||
|
|
|
||
|
|
# --- dd0c Products ---
|
||
|
|
# P3: Alert Intelligence
|
||
|
|
alert:
|
||
|
|
build:
|
||
|
|
context: ./products/03-alert-intelligence
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
ports:
|
||
|
|
- "3003:3000"
|
||
|
|
environment:
|
||
|
|
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:
|
||
|
|
build:
|
||
|
|
context: ./products/04-lightweight-idp
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
ports:
|
||
|
|
- "3004:3000"
|
||
|
|
environment:
|
||
|
|
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:
|
||
|
|
build:
|
||
|
|
context: ./products/05-aws-cost-anomaly
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
ports:
|
||
|
|
- "3005:3000"
|
||
|
|
environment:
|
||
|
|
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:
|
||
|
|
build:
|
||
|
|
context: ./products/06-runbook-automation/saas
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
ports:
|
||
|
|
- "3006:3000"
|
||
|
|
environment:
|
||
|
|
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:
|