-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-compose.email-test.yml
More file actions
78 lines (74 loc) · 3.12 KB
/
Copy pathdocker-compose.email-test.yml
File metadata and controls
78 lines (74 loc) · 3.12 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
# docker-compose.email-test.yml
# Test overlay: adds mock Gmail and mock Microsoft Graph servers for pinchy-email
# E2E tests. The fake LLM is started on the host by the dispatch-probe spec
# (startFakeOllama → host:11435, reached via the `ollama.local` alias), so there
# is no fake-Ollama container here.
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.e2e.yml -f docker-compose.email-test.yml up --build -d
services:
gmail-mock:
build:
context: config/gmail-mock
ports:
- "127.0.0.1:9004:9004"
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://localhost:9004/control/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))",
]
interval: 5s
timeout: 3s
retries: 10
graph-mock:
build:
context: config/graph-mock
ports:
- "127.0.0.1:9005:9005"
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://localhost:9005/control/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))",
]
interval: 5s
timeout: 3s
retries: 10
pinchy:
environment:
# Emit a dummy API-key SecretRef for the local Ollama provider so OpenClaw
# authenticates when routing to host.docker.internal (not treated as local).
- PINCHY_E2E_OLLAMA_LOCAL_API_KEY=1
# The web app performs the OAuth token refresh (credentials route), so it
# is the container that must talk to the mocks' /token endpoints.
- GMAIL_OAUTH_BASE_URL=http://gmail-mock:9004
- MICROSOFT_OAUTH_BASE_URL=http://graph-mock:9005
# The OAuth callback and connection probe fetch the user profile from Graph.
- GRAPH_API_BASE_URL=http://graph-mock:9005
# All three overrides above only take effect alongside this explicit flag
# (insecure-mock-base-url.ts). Pinchy — not OpenClaw — holds the OAuth
# client secret and the refresh tokens, so an unflagged *_OAUTH_BASE_URL
# left over in production would redirect strictly more than the plugin
# side does. Same convention as docker-compose.imap-test.yml, which
# already sets this flag on both services.
- PINCHY_INSECURE_MAIL_MOCK=1
extra_hosts:
# Allows Pinchy (Docker) to fetch the Ollama model list from fake-Ollama on
# the host during regenerateOpenClawConfig(). OpenClaw already has this
# mapping via the base docker-compose.yml extra_hosts block.
- "ollama.local:host-gateway"
openclaw:
environment:
# The pinchy-email plugin (running inside OpenClaw) calls the provider APIs.
- GMAIL_API_BASE_URL=http://gmail-mock:9004
- GRAPH_API_BASE_URL=http://graph-mock:9005
# Both *_API_BASE_URL overrides above only take effect alongside this
# explicit flag (gmail-adapter.ts / graph-adapter.ts), so a stray
# override left over in production can never silently redirect an
# OAuth-authenticated API call. Same convention as
# docker-compose.imap-test.yml's PINCHY_INSECURE_MAIL_MOCK.
- PINCHY_INSECURE_MAIL_MOCK=1