Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (108 loc) · 5.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (108 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# =============================================================================
# Agentomatic — local production-shaped stack
#
# docker compose up --build # API on http://localhost:8010
# docker compose --profile db up -d # …with Postgres-backed persistence
#
# oMLX runs natively on Apple Silicon, so the container reaches the host's
# OpenAI-compatible endpoint via host.docker.internal rather than running MLX
# inside Linux. Override AGENTOMATIC_PORT=8000 when there is no host model
# server occupying that port.
# =============================================================================
services:
platform:
build:
context: .
dockerfile: Dockerfile
image: agentomatic:latest
container_name: agentomatic-platform
restart: unless-stopped
ports:
- "${AGENTOMATIC_PORT:-8010}:8000"
environment:
AGENTOMATIC_TITLE: "${AGENTOMATIC_TITLE:-Agentomatic Platform}"
AGENTOMATIC_LOG_LEVEL: "${AGENTOMATIC_LOG_LEVEL:-INFO}"
# Studio, docs, health and metrics are on by default.
AGENTOMATIC_ENABLE_STUDIO: "${AGENTOMATIC_ENABLE_STUDIO:-1}"
AGENTOMATIC_ENABLE_METRICS: "${AGENTOMATIC_ENABLE_METRICS:-1}"
AGENTOMATIC_ENABLE_CONTROL_PLANE: "${AGENTOMATIC_ENABLE_CONTROL_PLANE:-1}"
# This is a production-shaped stack: do not start it exposed and
# unauthenticated. Compose fails before creating a container unless both
# secrets are supplied (for example through a local .env file).
AGENTOMATIC_REQUIRE_AUTH: "${AGENTOMATIC_REQUIRE_AUTH:-1}"
AGENTOMATIC_ENABLE_AUTH: "${AGENTOMATIC_ENABLE_AUTH:-1}"
AGENTOMATIC_API_KEY: "${AGENTOMATIC_API_KEY:?Set AGENTOMATIC_API_KEY before starting Docker}"
AGENTOMATIC_CONTROL_TOKEN: "${AGENTOMATIC_CONTROL_TOKEN:?Set AGENTOMATIC_CONTROL_TOKEN before starting Docker}"
AGENTOMATIC_ENABLE_RATE_LIMIT: "${AGENTOMATIC_ENABLE_RATE_LIMIT:-1}"
AGENTOMATIC_RATE_LIMIT_REQUESTS: "${AGENTOMATIC_RATE_LIMIT_REQUESTS:-100}"
AGENTOMATIC_RATE_LIMIT_WINDOW: "${AGENTOMATIC_RATE_LIMIT_WINDOW:-60}"
# Durable invocation history. Empty DATABASE_URL keeps it in-memory.
AGENTOMATIC_LOGS_HISTORY: "${AGENTOMATIC_LOGS_HISTORY:-0}"
# Optional JSONL audit sink. Point this at a durable mounted volume or
# let your log collector ingest stdout; an in-container path alone does
# not survive container replacement.
AGENTOMATIC_AUDIT_LOG: "${AGENTOMATIC_AUDIT_LOG:-}"
DATABASE_URL: "${DATABASE_URL:-}"
# OTLP is opt-in: point at the collector reachable from this container
# (for Docker Desktop, commonly http://host.docker.internal:4317).
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-}"
OTEL_SERVICE_NAME: "${OTEL_SERVICE_NAME:-agentomatic}"
# Bring your own cloud-provider credentials if the agents need them.
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
# Host oMLX defaults. They are harmless when agents use another provider.
OMLX_BASE_URL: "${OMLX_BASE_URL:-http://host.docker.internal:8000/v1}"
OMLX_API_KEY: "${OMLX_API_KEY:-kurwamac}"
AGENTOMATIC_TASK_MODEL: "omlx/${AGENTOMATIC_LIVE_MODEL:-Qwen3.5-9B-MLX-4bit}"
command:
["agentomatic", "run", "--agents-dir", "agents", "--host", "0.0.0.0", "--port", "8000"]
volumes:
# A runnable sample makes `docker compose up` verifiable immediately.
# Set AGENTOMATIC_AGENT_MOUNT=./agents for your own project directory.
- ${AGENTOMATIC_AGENT_MOUNT:-./e2e_demo/agents}:/app/agents:ro
# Optional resources follow the same discovery contract as a production
# project. The bundled deterministic fixtures make the full API surface
# locally verifiable; override each mount with your project's directory.
- ${AGENTOMATIC_PLUGINS_MOUNT:-./e2e_demo/plugins}:/app/plugins:ro
- ${AGENTOMATIC_ENDPOINTS_MOUNT:-./e2e_demo/endpoints}:/app/endpoints:ro
- ${AGENTOMATIC_INGESTION_MOUNT:-./e2e_demo/ingestion}:/app/ingestion:ro
# Studio's visual builder persists validated pipeline YAML here, so this
# is deliberately writable. Keep code-bearing agent/plugin/endpoint
# mounts read-only; pipeline definitions are the controlled editable
# deployment artifact. Mount your managed pipeline directory here.
- ${AGENTOMATIC_PIPELINES_MOUNT:-./e2e_demo/pipelines}:/app/pipelines
- agentomatic-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks: [agentomatic]
# Enable with: docker compose --profile db up -d
# then point the platform at it by setting, in .env:
# DATABASE_URL=postgresql+asyncpg://agentomatic:agentomatic@db:5432/agentomatic
# AGENTOMATIC_LOGS_HISTORY=1
db:
profiles: ["db"]
image: postgres:16-alpine
container_name: agentomatic-db
restart: unless-stopped
environment:
POSTGRES_USER: "${POSTGRES_USER:-agentomatic}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-agentomatic}"
POSTGRES_DB: "${POSTGRES_DB:-agentomatic}"
volumes:
- agentomatic-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-agentomatic}"]
interval: 5s
timeout: 5s
retries: 20
networks: [agentomatic]
volumes:
agentomatic-data:
agentomatic-db:
networks:
agentomatic:
driver: bridge