-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
205 lines (184 loc) · 6.63 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
205 lines (184 loc) · 6.63 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# Automaker Production Docker Compose (single-machine)
# High-memory configuration for concurrent agent execution. Standalone file —
# replaces the docker-compose.yml + override pattern. No Swarm required.
#
# Usage:
# # Quick setup:
# ./scripts/setup-prod.sh
#
# # Or manually (source .env first, env vars are read from shell):
# set -a && source .env && set +a
# docker compose -f docker-compose.prod.yml up -d
# docker compose -f docker-compose.prod.yml logs -f
#
# Non-Docker alternative: run `npm start` on the host for a prod-like local
# instance that keeps host CLIs (gh, codex, infisical) reachable from agents.
# See docs/self-hosting/deployment.md for full documentation.
name: automaker
services:
# Frontend UI
ui:
build:
context: .
dockerfile: Dockerfile
target: ui
args:
GIT_COMMIT_SHA: ${GIT_COMMIT_SHA:-unknown}
container_name: automaker-ui
restart: unless-stopped
ports:
- '${UI_PORT:-3007}:80'
depends_on:
server:
condition: service_healthy
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 256M
healthcheck:
test: ['CMD', 'wget', '-q', '--spider', 'http://127.0.0.1:80/']
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
# Backend API Server
server:
build:
context: .
dockerfile: Dockerfile
target: server
args:
UID: ${UID:-1001}
GID: ${GID:-1001}
GIT_COMMIT_SHA: ${GIT_COMMIT_SHA:-unknown}
container_name: automaker-server
restart: on-failure:5
ports:
- '${API_PORT:-3008}:3008'
- '${CRDT_MESH_PORT:-4444}:4444'
- '${CRDT_STORE_PORT:-4445}:4445'
environment:
# API keys (from .env or environment)
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- AUTOMAKER_API_KEY=${AUTOMAKER_API_KEY:-}
- GH_TOKEN=${GH_TOKEN:-}
- CLAUDE_OAUTH_CREDENTIALS=${CLAUDE_OAUTH_CREDENTIALS:-}
- CURSOR_AUTH_TOKEN=${CURSOR_AUTH_TOKEN:-}
- DISCORD_TOKEN=${DISCORD_TOKEN:-}
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-}
# Langfuse observability
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_BASE_URL=${LANGFUSE_BASE_URL:-}
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-protolabs-server}
# Discord channel IDs for Ava Gateway and notifications
- DISCORD_GUILD_ID=${DISCORD_GUILD_ID:-1070606339363049492}
- DISCORD_CHANNEL_INFRA=${DISCORD_CHANNEL_INFRA:-1469109809939742814}
- DISCORD_CHANNEL_AGENT_LOGS=${DISCORD_CHANNEL_AGENT_LOGS:-}
- DISCORD_CHANNEL_CODE_REVIEW=${DISCORD_CHANNEL_CODE_REVIEW:-}
- DISCORD_CHANNEL_SUGGESTIONS=${DISCORD_CHANNEL_SUGGESTIONS:-}
# Staging configuration
- NODE_ENV=production
- HOST=0.0.0.0
- PORT=3008
- DATA_DIR=/data
- LOG_LEVEL=${LOG_LEVEL:-info}
- ENABLE_REQUEST_LOGGING=true
- IS_CONTAINERIZED=true
# Project access - host path mounted at same path for MCP compatibility
- ALLOWED_ROOT_DIRECTORY=${ALLOWED_ROOT_DIRECTORY:-/home/josh/dev}
- AUTOMAKER_PROJECT_PATH=${AUTOMAKER_PROJECT_PATH:-/home/josh/dev/ava}
# Public callback URL advertised in the A2A agent card (/.well-known/agent.json).
# Must be externally routable so peers (e.g. Workstacean) can POST to /a2a.
# Example: PUBLIC_CALLBACK_URL=https://ava.proto-labs.ai
- PUBLIC_CALLBACK_URL=${PUBLIC_CALLBACK_URL:-}
# CORS
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:3007}
# Agent concurrency limit (system hard cap)
- AUTOMAKER_MAX_CONCURRENCY=${AUTOMAKER_MAX_CONCURRENCY:-6}
# Node.js memory tuning for high-concurrency agent execution
- NODE_OPTIONS=--max-old-space-size=${NODE_MAX_OLD_SPACE:-4096} --max-semi-space-size=128
# Redirect npm cache to tmpfs so read_only root filesystem works
- NPM_CONFIG_CACHE=/npm-cache
volumes:
# Persistent data
- automaker-data:/data
- automaker-claude-config:/home/automaker/.claude
- automaker-cursor-config:/home/automaker/.cursor
- automaker-opencode-data:/home/automaker/.local/share/opencode
- automaker-opencode-config:/home/automaker/.config/opencode
- automaker-opencode-cache:/home/automaker/.cache/opencode
# Host project directories - mount at same path for MCP path compatibility
- ${PROJECTS_MOUNT:-/home/josh/dev}:${PROJECTS_MOUNT:-/home/josh/dev}:rw
- ${LABS_MOUNT:-/home/josh/labs}:${LABS_MOUNT:-/home/josh/labs}:rw
# Allow container to reach host-bound services (e.g. LiteLLM gateway at ava:4000)
# host-gateway is a Docker special value that resolves to the Docker host IP on Linux
extra_hosts:
- 'ava:host-gateway'
# Run as the automaker user so entrypoint works without CHOWN/SETUID caps
user: '${UID:-1001}:${GID:-1001}'
# Read-only root filesystem — writes go to named volumes or tmpfs mounts.
# /home/automaker tmpfs provides writable space for ~/.claude.json and other
# dotfiles; named volume mounts at subdirectories (.claude/, .cursor/, etc.)
# take precedence and remain persistent across restarts.
read_only: true
tmpfs:
- /tmp:size=512m,mode=1777
- /npm-cache:size=512m
- /home/automaker:size=64m,uid=${UID:-1001},gid=${GID:-1001},mode=0750
cap_drop:
- ALL
cap_add:
- NET_RAW
security_opt:
- no-new-privileges:true
- seccomp:./seccomp-profile.json
deploy:
resources:
limits:
cpus: '${CPU_LIMIT:-6}'
memory: ${MEMORY_LIMIT:-32G}
reservations:
cpus: '2'
memory: 8G
healthcheck:
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:3008/api/health/ready']
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: json-file
options:
max-size: '100m'
max-file: '10'
# Documentation Site — hosted on Cloudflare Pages (docs.protolabs.studio).
# Deployed via .github/workflows/deploy-docs.yml, not Docker.
volumes:
automaker-data:
name: automaker-data
external: true
automaker-claude-config:
name: automaker-claude-config
external: true
automaker-cursor-config:
name: automaker-cursor-config
external: true
automaker-opencode-data:
name: automaker-opencode-data
external: true
automaker-opencode-config:
name: automaker-opencode-config
external: true
automaker-opencode-cache:
name: automaker-opencode-cache
external: true