Governed substrate for autonomous agents: scoped identity (passports), audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
86 lines
2 KiB
YAML
86 lines
2 KiB
YAML
# GOD CRM + Judge0 Code Execution Engine
|
|
# ADR-032: Code Execution Engine — Judge0 + Agent Loop
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# Judge0 CE - Code Execution Engine
|
|
judge0:
|
|
image: judge0/judge0:1.13.1
|
|
ports:
|
|
- "2358:2358"
|
|
privileged: true
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- POSTGRES_HOST=judge0-db
|
|
- POSTGRES_DB=judge0
|
|
- POSTGRES_USER=judge0
|
|
- POSTGRES_PASSWORD=judge0password
|
|
# Callback settings for Agent Loop
|
|
- CALLBACKS_MAX_TRIES=3
|
|
- CALLBACKS_TIMEOUT=5
|
|
# Performance tuning
|
|
- RAILS_MAX_THREADS=5
|
|
- RAILS_ENV=production
|
|
depends_on:
|
|
- redis
|
|
- judge0-db
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:2358/about"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# Judge0 Workers - execute submissions
|
|
judge0-workers:
|
|
image: judge0/judge0:1.13.1
|
|
command: ["./scripts/workers"]
|
|
privileged: true
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- POSTGRES_HOST=judge0-db
|
|
- POSTGRES_DB=judge0
|
|
- POSTGRES_USER=judge0
|
|
- POSTGRES_PASSWORD=judge0password
|
|
- RAILS_ENV=production
|
|
depends_on:
|
|
- judge0
|
|
- redis
|
|
- judge0-db
|
|
restart: unless-stopped
|
|
|
|
# Redis for Judge0 queue
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
# PostgreSQL for Judge0 (separate from GOD CRM)
|
|
judge0-db:
|
|
image: postgres:15-alpine
|
|
environment:
|
|
- POSTGRES_DB=judge0
|
|
- POSTGRES_USER=judge0
|
|
- POSTGRES_PASSWORD=judge0password
|
|
volumes:
|
|
- judge0-postgres:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U judge0 -d judge0"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
redis-data:
|
|
judge0-postgres:
|