-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (125 loc) · 4.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
130 lines (125 loc) · 4.2 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
networks:
stack:
# Explicit name so the orchestrator can attach spawned sibling
# containers to the same network regardless of the compose project
# name that Dokploy assigns.
name: hathor-mcp-stack
services:
# Multi-tenant wallet-headless orchestrator. Spawns per-session
# wallet-headless Docker containers via the host's Docker socket
# and attaches them to the `hathor-mcp-stack` network so the MCP
# server (and the proxy) can reach them by container name.
orchestrator:
build:
context: ./headless-orchestrator
command:
- "--port=8100"
- "--fullnode-url=https://node1.playground.testnet.hathor.network/v1a/"
- "--network=testnet"
- "--docker-network=hathor-mcp-stack"
- "--headless-image=hathornetwork/hathor-wallet-headless:latest"
- "--tx-mining-url=https://txmining.playground.testnet.hathor.network/"
- "--idle-timeout-secs=1800"
- "--max-instances=50"
volumes:
# Needed so the orchestrator can spawn sibling containers on the host.
- /var/run/docker.sock:/var/run/docker.sock
networks:
- stack
ports:
- "8100:8100"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8100/sessions"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
# MCP server for Claude / other AI agents. Talks to the orchestrator
# for isolated, per-session wallet-headless instances.
mcp:
build:
context: ./hathor-mcp
command:
- "--port=9876"
- "--fullnode-url=https://node1.playground.testnet.hathor.network"
- "--orchestrator-url=http://orchestrator:8100"
networks:
- stack
ports:
- "9876:9876"
restart: unless-stopped
depends_on:
orchestrator:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9876/health"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
# Dedicated wallet-headless container for the public faucet.
# Not managed by the orchestrator — we want it stable & always-on so
# the faucet frontend can always show a balance.
faucet-wallet:
image: hathornetwork/hathor-wallet-headless:latest
pull_policy: always
# Matches the known-working x402-poc pattern: explicit node entrypoint
# (the default image entrypoint has a pre-flight wrapper that rejects
# some env combinations).
entrypoint: ["node", "dist/index.js"]
environment:
HEADLESS_HTTP_BIND: "0.0.0.0"
HEADLESS_HTTP_PORT: "8000"
HEADLESS_NETWORK: "testnet"
HEADLESS_SERVER: "https://node1.playground.testnet.hathor.network/v1a/"
HEADLESS_TX_MINING_URL: "https://txmining.playground.testnet.hathor.network/"
HEADLESS_API_KEY: "${FAUCET_API_KEY}"
HEADLESS_SEED_DEFAULT: "${FAUCET_SEED}"
networks:
- stack
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:8000/',r=>{process.exit(r.statusCode<500?0:1)}).on('error',()=>process.exit(1))"]
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
# Hathor testnet faucet — beautiful frontend + tiny Rust backend
# that drips HTR with a tier that scales with the faucet balance
# and a 24h per-IP cooldown.
faucet:
build:
context: ./faucet
command:
- "--port=8200"
- "--wallet-url=http://faucet-wallet:8000"
- "--wallet-id=faucet"
environment:
FAUCET_API_KEY: "${FAUCET_API_KEY}"
FAUCET_SEED: "${FAUCET_SEED}"
RUST_LOG: "info,tower_http=info,hathor_faucet=info"
networks:
- stack
ports:
- "8200:8200"
restart: unless-stopped
depends_on:
- faucet-wallet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8200/health"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
# Static documentation site that tells users how to add the Hathor
# MCP to Claude Desktop / Claude Code with "press to copy" snippets.
mcp-docs:
build:
context: ./mcp-docs
networks:
- stack
ports:
- "8300:80"
restart: unless-stopped
# Healthcheck lives in the Dockerfile (uses curl, which we install there).