-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.forgecode-test.yml
More file actions
73 lines (69 loc) · 3.47 KB
/
docker-compose.forgecode-test.yml
File metadata and controls
73 lines (69 loc) · 3.47 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
# Docker Compose for Relay Proxy + ForgeCode integration testing.
#
# Usage:
# 1. Generate sanitised configs:
# bun scripts/gen-test-configs.ts
#
# 2. Run interactive forge session:
# docker compose -f docker-compose.forgecode-test.yml up
# or
# docker compose -f docker-compose.forgecode-test.yml run --rm relay-proxy-forgecode
#
# 3. Smoke-test only (proxy health + exit):
# ./scripts/test-relay-forgecode.sh --smoke-only
#
# Architecture:
# ┌─────────────────────────────────────────────────────────────────┐
# │ Container (relay-proxy-forgecode) │
# │ │
# │ forge ──▶ ANTHROPIC_BASE_URL ──▶ relay proxy ──▶ MiniMax API │
# │ (http://127.0.0.1:8787/api) port 8787 │
# │ │
# │ /root/.config/relay/settings.json ← 4× cloned MiniMax accts │
# │ /root/forge/.credentials.json ← minimax + github_copilot│
# │ /root/forge/.mcp.json ← MCP server config │
# └─────────────────────────────────────────────────────────────────┘
#
# Safety: ZAI accounts are NEVER copied into the container.
#
services:
relay-proxy-forgecode:
# Build context is the monorepo root so we can COPY both relay/ and forgecode-sdk/
build:
context: ..
dockerfile: submodules/relay/Dockerfile.forgecode
args:
# forge binary is pre-copied into relay submodule by the test script
FORGE_BINARY: ./submodules/relay/forge
container_name: relay-proxy-forgecode
# No host port mapping — smoke test uses `docker exec` to curl from inside
# the container. Interactive forge also runs inside, using 127.0.0.1:8787.
# Uncomment only if you need to inspect the proxy from the host:
# ports:
# - "127.0.0.1:8787:8787"
volumes:
# ── Configs (read-only) ────────────────────────────────────────────
# Sanitised relay settings: 4× cloned MiniMax accounts, zero ZAI
- ./test-configs/relay-settings.json:/root/.config/relay/settings.json:ro
# Forge credentials: minimax + github_copilot + forge_services (NO zai_coding)
- ./test-configs/forge-credentials.json:/root/forge/.credentials.json:ro
# Forge MCP server definitions
- ./test-configs/forge-mcp.json:/root/forge/.mcp.json:ro
# ── Ephemeral runtime state (persist logs if needed) ──────────────
- relay-claude-state:/root/.claude
- relay-forge-logs:/root/forge/logs
environment:
# Forge uses this to route through the relay proxy
ANTHROPIC_BASE_URL: http://127.0.0.1:8787/api/anthropic
# Any non-empty string satisfies the proxy's auth check
ANTHROPIC_AUTH_TOKEN: placeholder
RELAY_PROXY_PORT: "8787"
HOME: /root
# Keep TTY open so interactive `forge` sessions work
tty: true
stdin_open: true
# Restart policy: do not restart between test runs (explicit up/down)
restart: "no"
volumes:
relay-claude-state:
relay-forge-logs: