-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.staging.yml
More file actions
161 lines (147 loc) · 4.7 KB
/
docker-compose.staging.yml
File metadata and controls
161 lines (147 loc) · 4.7 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
# Automaker Staging Docker Compose
# High-memory configuration for concurrent agent execution.
# Standalone file - replaces docker-compose.yml + override for staging deployments.
#
# Usage:
# # Quick setup:
# ./scripts/setup-staging.sh
#
# # Or manually (source .env first, env vars are read from shell):
# set -a && source .env && set +a
# docker compose -f docker-compose.staging.yml up -d
# docker compose -f docker-compose.staging.yml logs -f
#
# See docs/infra/staging-deployment.md for full documentation.
name: automaker-staging
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:-}
# 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}
# 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}
# 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
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
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