-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (64 loc) · 2.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (64 loc) · 2.08 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
services:
mcp-whatsapp:
build: .
container_name: whatsapp-mcp-stream
restart: always
ports:
- "3003:3001" # MCP HTTP port (host:container)
environment:
# Logging level: fatal, error, warn, info, debug, trace
- LOG_LEVEL=debug
# Baileys logging level: silent, fatal, error, warn, info, debug, trace
- BAILEYS_LOG_LEVEL=info
# Log incoming WhatsApp events (debugging)
- WA_EVENT_LOG=1
# Capture full Baileys event stream to file (debugging)
- WA_EVENT_STREAM=1
- WA_EVENT_STREAM_PATH=/app/logs/wa-events.log
# Reconnect safety net after force resync (1=enabled)
- WA_RESYNC_RECONNECT=1
- WA_RESYNC_RECONNECT_DELAY_MS=15000
# Transport type: stdio, sse, or http (streamable HTTP)
- TRANSPORT=http
- MCP_HTTP_ENABLE_JSON_RESPONSE=1
# FFmpeg path (already installed in container)
- FFMPEG_PATH=/usr/bin/ffmpeg
# Media storage directory
- MEDIA_DIR=/app/media
# Baileys store path (persist chats/messages)
- STORE_PATH=/app/whatsapp-sessions/baileys/store.json
# For SSE transport, you can specify port (default: 3001)
- SSE_PORT=3001
volumes:
# Persist WhatsApp sessions (QR code authentication)
- whatsapp-sessions:/app/whatsapp-sessions
# Persist logs (optional)
- logs:/app/logs
# Persist downloaded media
- media:/app/media
# Mount local .env file for custom configuration (optional)
# - ./:/app/.env:ro
# Drop files here to send via send_media (media_path: /app/files/<name>)
- ./files:/app/files
working_dir: /app
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://localhost:3001/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
command: node --no-deprecation dist/index.js --http
user: mcpuser
volumes:
whatsapp-sessions:
driver: local
logs:
driver: local
media:
driver: local