- phase3.go: RequestExecution now calls InsertEntity before InsertExecution (executions.entity_id references entities.id via FK constraint). - mcp/server.go: request_execution MCP tool same fix — inserts entities row with slug 'exec:<target>:<id8>' before executions insert. - docker-compose.yml: fix seed OIKOS_SEEDS_DIR from /app/seeds to /seeds (distroless image COPY destination).
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
# Docker Compose for Oikos development
|
|
# Usage: docker compose up -d postgres (just the DB)
|
|
# make dev (full dev stack)
|
|
|
|
services:
|
|
postgres:
|
|
image: timescale/timescaledb:2.17.2-pg16
|
|
environment:
|
|
POSTGRES_DB: oikos
|
|
POSTGRES_USER: oikos
|
|
POSTGRES_PASSWORD: ${OIKOS_DB_PASSWORD:-oikos_dev}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pg-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "oikos"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# One-shot: run migrations then exit
|
|
migrate:
|
|
build:
|
|
context: .
|
|
dockerfile: compose/oikos/Dockerfile
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
OIKOS_DATABASE_URL: postgres://oikos:${OIKOS_DB_PASSWORD:-oikos_dev}@postgres:5432/oikos?sslmode=disable
|
|
command: ["migrate"]
|
|
restart: "no"
|
|
|
|
# One-shot: ingest seeds then exit
|
|
seed:
|
|
build:
|
|
context: .
|
|
dockerfile: compose/oikos/Dockerfile
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
OIKOS_DATABASE_URL: postgres://oikos:${OIKOS_DB_PASSWORD:-oikos_dev}@postgres:5432/oikos?sslmode=disable
|
|
OIKOS_SEEDS_DIR: /seeds
|
|
command: ["seed"]
|
|
restart: "no"
|
|
|
|
# API server (Phase 2)
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: compose/oikos/Dockerfile
|
|
profiles: ["dev", "full"]
|
|
depends_on:
|
|
seed:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
OIKOS_DATABASE_URL: postgres://oikos:${OIKOS_DB_PASSWORD:-oikos_dev}@postgres:5432/oikos?sslmode=disable
|
|
OIKOS_API_LISTEN: ":8090"
|
|
OIKOS_ENV: dev
|
|
OIKOS_DEBUG: "true"
|
|
OIKOS_HERMES_AGENT_ID: ${OIKOS_HERMES_AGENT_ID:-}
|
|
ports:
|
|
- "8090:8090"
|
|
command: ["api"]
|
|
stop_signal: SIGTERM
|
|
stop_grace_period: 30s
|
|
|
|
# Scheduler (Phase 3) — observe loop
|
|
scheduler:
|
|
build:
|
|
context: .
|
|
dockerfile: compose/oikos/Dockerfile
|
|
profiles: ["dev", "full"]
|
|
depends_on:
|
|
seed:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
OIKOS_DATABASE_URL: postgres://oikos:${OIKOS_DB_PASSWORD:-oikos_dev}@postgres:5432/oikos?sslmode=disable
|
|
OIKOS_DEBUG: "true"
|
|
OIKOS_SCHEDULER_INTERVAL: "30s"
|
|
command: ["scheduler"]
|
|
stop_signal: SIGTERM
|
|
stop_grace_period: 30s
|
|
|
|
# Notifier (Phase 3) — Matrix alerts
|
|
notifier:
|
|
build:
|
|
context: .
|
|
dockerfile: compose/oikos/Dockerfile
|
|
profiles: ["dev", "full"]
|
|
depends_on:
|
|
seed:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
OIKOS_DATABASE_URL: postgres://oikos:${OIKOS_DB_PASSWORD:-oikos_dev}@postgres:5432/oikos?sslmode=disable
|
|
OIKOS_DEBUG: "true"
|
|
OIKOS_APPROVAL_HMAC_SECRET: ${OIKOS_APPROVAL_HMAC_SECRET:-dev-secret}
|
|
command: ["notifier"]
|
|
stop_signal: SIGTERM
|
|
stop_grace_period: 30s
|
|
|
|
volumes:
|
|
pg-data:
|