Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
152 lines (147 loc) · 6.27 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
152 lines (147 loc) · 6.27 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
# SignalPilot — Hot-reload development overlay
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build db gateway notebook sandbox
# cd signalpilot/web && pnpm exec next dev --port 3200 --hostname 0.0.0.0 --webpack
#
# Keep docker-compose.yml as the reproducible/prod-like stack. This overlay is
# for day-to-day code edits: source is bind-mounted, dependency/build artifacts
# stay inside Linux containers, and long-running services reload or restart.
# The web app runs on the host by default for faster local iteration. Enable the
# docker-web profile if you specifically need the containerized Next.js service.
services:
gateway:
environment:
# Local development databases (including host.docker.internal) are
# intentionally reachable only in the loopback-bound dev stack.
SP_ALLOW_PRIVATE_CONNECTIONS: "true"
# Match the staging Data Chat runtime while retaining local endpoints,
# storage, and credentials.
SP_CHAT_AGENT_MODEL: "claude-opus-5-5"
SP_AGENT_EFFORT: "medium"
SP_FEATURE_CHAT_SIZE_ROUTER: "shadow"
SP_FEATURE_CHAT_ORG_SHARING: "true"
SP_FEATURE_CHAT_FORKING: "true"
env_file:
- path: ./.slack.local.env
required: false
- path: ./.env
required: false
volumes:
- ./signalpilot/gateway/gateway:/app/gateway:cached
- ./scripts/dev-watch-notebook.py:/usr/local/bin/dev-watch-notebook.py:ro
command: >
sh -c "/app/.venv/bin/python -m gateway.dev_local_api_key /shared/local_api_key && exec /app/.venv/bin/python /usr/local/bin/dev-watch-notebook.py --watch /app/gateway --interval 1 -- /app/.venv/bin/uvicorn gateway.main:app --host 0.0.0.0 --port 3300"
notebook:
# Use the same immutable sandbox image definition as staging. The base
# compose file's notebook-server/Dockerfile is intentionally lightweight
# and does not include the deployed SignalPilot plugin or full adapter set.
build:
context: .
dockerfile: Dockerfile.notebook
env_file:
- path: ./.slack.local.env
required: false
- path: ./.env
required: false
environment:
# Local direct mode funnels every browser/account through one notebook
# server. Let distinct kernel session IDs coexist so shareability can be
# tested without one tab taking over another.
SP_ALLOW_CONCURRENT_EDIT_SESSIONS: "true"
SP_AGENT_EFFORT: "medium"
volumes:
- ./signalpilot/notebook-server/signalpilot:/opt/sp-notebook/signalpilot:cached
- ./scripts/dev-watch-notebook.py:/usr/local/bin/dev-watch-notebook.py:ro
entrypoint:
- sh
- -c
- |
export SP_API_KEY=$$(cat /shared/local_api_key 2>/dev/null || echo '')
if [ ! -s /gateway-secrets/notebook_jwt_secret ]; then
umask 077
python -c 'import secrets; print(secrets.token_urlsafe(48))' > /gateway-secrets/notebook_jwt_secret.tmp
mv /gateway-secrets/notebook_jwt_secret.tmp /gateway-secrets/notebook_jwt_secret
fi
export SP_SESSION_JWT_SECRET=$$(cat /gateway-secrets/notebook_jwt_secret)
/opt/sp-notebook/.venv/bin/python -m signalpilot._server.local_token /notebook-token/token
exec /opt/sp-notebook/.venv/bin/python /usr/local/bin/dev-watch-notebook.py \
--watch /opt/sp-notebook/signalpilot \
--interval 1 \
-- /opt/sp-notebook/.venv/bin/python -m signalpilot --development-mode edit \
--host 0.0.0.0 --port 2718 --headless \
--token-password-file /notebook-token/token --no-skew-protection \
--allow-origins http://localhost:${SP_WEB_PORT:-3200},http://localhost:${SP_GATEWAY_PORT:-3300} \
/workspace
web:
profiles:
- docker-web
build:
target: dev
healthcheck:
disable: true
environment:
NODE_ENV: development
NEXT_TELEMETRY_DISABLED: "1"
NEXT_PUBLIC_DEPLOYMENT_MODE: local
NEXT_PUBLIC_GATEWAY_URL: http://localhost:${SP_GATEWAY_PORT:-3300}
SP_GATEWAY_INTERNAL_URL: http://gateway:3300
WATCHPACK_POLLING: "true"
CHOKIDAR_USEPOLLING: "true"
volumes:
- ./signalpilot/web:/app/signalpilot/web:cached
- type: volume
source: signalpilot-web-node-modules
target: /app/signalpilot/web/node_modules
volume:
nocopy: true
- signalpilot-web-next:/app/signalpilot/web/.next
- signalpilot-shared:/shared:ro
command: >
sh -c 'i=0;
while [ ! -f /shared/local_api_key ] && [ "$$i" -lt 30 ]; do
sleep 1;
i=$$((i+1));
done;
if [ -f /shared/local_api_key ]; then
export SP_LOCAL_API_KEY="$$(cat /shared/local_api_key)";
fi;
if [ ! -d node_modules/next ]; then
npm ci --legacy-peer-deps;
fi;
case "$$(uname -m)" in
aarch64)
if [ ! -e node_modules/lightningcss-linux-arm64-gnu/lightningcss.linux-arm64-gnu.node ]; then
npm install --legacy-peer-deps --no-save lightningcss-linux-arm64-gnu@1.32.0 @tailwindcss/oxide-linux-arm64-gnu@4.2.4;
fi
;;
x86_64)
if [ ! -e node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node ]; then
npm install --legacy-peer-deps --no-save lightningcss-linux-x64-gnu@1.32.0 @tailwindcss/oxide-linux-x64-gnu@4.2.4;
fi
;;
esac;
bundler_flag="--webpack";
case "$${NEXT_DEV_BUNDLER:-webpack}" in
turbo|turbopack)
bundler_flag="--turbopack";
;;
webpack|"")
bundler_flag="--webpack";
;;
*)
echo "Unknown NEXT_DEV_BUNDLER=$${NEXT_DEV_BUNDLER}; using webpack";
;;
esac;
rm -rf .next/dev;
exec npm run dev -- --hostname 0.0.0.0 "$$bundler_flag"'
gateway-chat-worker:
environment:
SP_CHAT_AGENT_MODEL: "claude-opus-5-5"
SP_AGENT_EFFORT: "medium"
SP_FEATURE_CHAT_SIZE_ROUTER: "shadow"
SP_FEATURE_CHAT_ORG_SHARING: "true"
SP_FEATURE_CHAT_FORKING: "true"
volumes:
signalpilot-web-node-modules:
signalpilot-web-next: