-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
205 lines (176 loc) · 6.57 KB
/
docker-compose.yml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# docker-compose 来自于 Phala Network 官方Repo ! 整理 By 苏格
version: "2"
x-defaults: &defaults
volumes: &default-volume-config
- /var/khala-dev-node/prb_data:/var/data
services:
data_provider:
image: phalanetwork/prb:next
hostname: data_provider
network_mode: host
restart: always
volumes: *default-volume-config
logging:
options:
# 保存的日志大小
# max-size: "1g"
max-size: "500m"
environment:
# 要启动的模块
- PHALA_MODULE=data_provider
# 应用程序环境,设置为开发以将应用置于开发模式
- NODE_ENV=development
# 记录日志级别
- PHALA_LOGGER_LEVEL=debug
# 要和 PRB 的 lifecycle 的相同环境变量保持一致
- PHALA_BRIDGE_IDENTITY=staging
# WebSocket端点到中继链的Substrate RPC(例如,对于Khala来说,它是Kusama)
- PHALA_PARENT_CHAIN_ENDPOINT=ws://127.0.0.1:9945
# 指向副链的 Substrate RPC 的 WebSocket 端点(这里指向khala)。
- PHALA_CHAIN_ENDPOINT=ws://127.0.0.1:9944
# libp2p 的侦听地址的多地址(https://github.com/libp2p/specs/tree/master/addressing)
# 默认为'/ip4/0.0.0.0/tcp/0,/ip6/::/tcp/0',这意味着在每个接口上侦听一个随机端口。
# 仅支持 TCP 协议。在地址之间使用逗号。配置127.0.0.1可能会无法被发现
# - PHALA_WALKIE_LISTEN_ADDRESSES=/ip4/127.0.0.1/tcp/28888,/ip6/::/tcp/28889
- PHALA_WALKIE_LISTEN_ADDRESSES=/ip4/0.0.0.0/tcp/28888,/ip6/::/tcp/28889
# 用于对等发现的引导节点的多添加列表默认为"/ip4/0.0.0.0/tcp/18888,/ip6/::/tcp/28889",这意味着没有引导节点。
# 仅支持 TCP 协议。在地址之间使用逗号。
# - PHALA_WALKIE_BOOT_NODES=/ip4/0.0.0.0/tcp/18888,/ip6/::/tcp/28889
- PHALA_WALKIE_BOOT_NODES=/ip4/0.0.0.0/tcp/18888,/ip6/::/tcp/18889
# BLOB服务session使用的最大内存为64G
- PHALA_LIFECYCLE_BLOB_SERVER_SESSION_MAX_MEMORY=64
# 存储标识密钥的路径默认为"./data/keys/id",默认存储./data/keys/id
# - PHALA_PEER_ID_PREFIX=./data/keys/id
# the blob server, defaults to 8012
# PHALA_DATA_PROVIDER_LOCAL_SERVER_PORT=8012
# The path to database, defaults to './data/0'.
# - PHALA_LOCAL_DB_PATH=
entrypoint:
- "node"
- "--trace-warnings"
- "--experimental-json-modules"
- "--es-module-specifier-resolution=node"
- "--harmony-top-level-await"
# - "--trace-gc"
# - "--expose-gc"
# - "--no-compilation-cache"
# - "--max-old-space-size=10240"
# - "--max-heap-size=100"
# - "--no-always-promote-young-mc"
- "dist/index"
monitor:
image: phalanetwork/prb-monitor:next
hostname: monitor
network_mode: host
environment:
- NS_FETCH=fetch
- NEXT_PUBLIC_NS_LIST=default
- PTP_BOOT_NODES=/ip4/127.0.0.1/tcp/28888
# ports:
# - "3000:3000"
# services:
redis-q:
network_mode: host
image: redis:alpine
hostname: redis-q
restart: always
logging:
options:
max-size: "1g"
command: ["redis-server", "--port", "63792", "--appendonly", "no", '--save', '']
# ports:
# - "63792:63792"
arena:
network_mode: host
image: phalanetwork/prb:next
hostname: arena
restart: always
depends_on:
- redis-q
environment:
- PHALA_MODULE=utils/arena
- NODE_ENV=development
- PHALA_LOGGER_LEVEL=debug
- PHALA_NAMESPACE=default
- REDIS_ENDPOINT=redis://127.0.0.1:63792/
# ports:
# - "4567:4567"
trade:
network_mode: host
image: phalanetwork/prb:next
hostname: trade
restart: always
volumes: *default-volume-config
logging:
options:
# max-size: "1g"
max-size: "500m"
depends_on:
- redis-q
environment:
- PHALA_MODULE=trade
- NODE_ENV=development
- PHALA_DB_NAMESPACE=default
- PHALA_DB_FETCH_NAMESPACE=fetch
- PHALA_DB_ENDPOINT=redis://127.0.0.1:6666
- PHALA_LOGGER_LEVEL=debug
- PHALA_PARENT_CHAIN_ENDPOINT=ws://127.0.0.1:9945
- PHALA_CHAIN_ENDPOINT=ws://127.0.0.1:9944
- PHALA_Q_REDIS_ENDPOINT=redis://127.0.0.1:63792/
entrypoint:
- "node"
- "--trace-warnings"
- "--experimental-json-modules"
- "--es-module-specifier-resolution=node"
- "--harmony-top-level-await"
# - "--max-old-space-size=10240"
- "dist/index"
lifecycle:
network_mode: host
image: phalanetwork/prb:next
hostname: lifecycle
restart: always
depends_on:
- redis-q
volumes: *default-volume-config
logging:
options:
# max-size: "1g"
max-size: "500m"
environment:
# 默认为false
# - PHALA_SYNC_ONLY=true
# - PHALA_SYNC_ONLY=false
- PHALA_MODULE=lifecycle
- NODE_ENV=development
- PHALA_LOGGER_LEVEL=debug
# 要和 dp 的 data_provider 的相同环境变量保持一致
- PHALA_BRIDGE_IDENTITY=staging
- PHALA_Q_REDIS_ENDPOINT=redis://127.0.0.1:63792/
# WebSocket端点到中继链的Substrate RPC(例如,对于Khala来说,它是Kusama)
- PHALA_PARENT_CHAIN_ENDPOINT=ws://127.0.0.1:9945
# 指向副链的 Substrate RPC 的 WebSocket 端点(这里指向khala)。
- PHALA_CHAIN_ENDPOINT=ws://127.0.0.1:9944
# The size of LRU cache, defaults to 5000.
- PHALA_LRU_CACHE_SIZE=50
# LRU 缓存中项目的最大时间(以毫秒为单位),默认为 30 分钟。
- PHALA_LRU_CACHE_MAX_AGE=90000
- PHALA_PRPC_REQUEST_TIMEOUT=60000
# 应该是同一时间点,lifecycle一次性同步的最大worker数
- PHALA_RUNNER_MAX_WORKER_NUMBER=150
# 是否应该进入配置模式,它将仅启动 API 以添加/修改已保存的pools和workers,
# - PHALA_ENFORCE_MIN_BENCH_SCORE=true
# - PHALA_WALKIE_BOOT_NODES=/ip4/10.87.0.51/tcp/28888/p2p/QmbgiLdgeBhVmCfDtrFzC158HCkRTC4J38tZay2T3uxjtJ,/ip4/10.87.0.52/tcp/28888/p2p/QmWhwPfb2VtuBQtrepw9shoafGmvnXdKu8fNq7Yfw32jCN
- PHALA_WALKIE_BOOT_NODES=/ip4/127.0.0.1/tcp/28888/p2p/{YOUR DATA PROVIDERS's PEERID}
# - PHALA_WALKIE_LISTEN_ADDRESSES=/ip4/127.0.0.1/tcp/29888,/ip6/::/tcp/29889
- PHALA_WALKIE_LISTEN_ADDRESSES=/ip4/0.0.0.0/tcp/29888,/ip6/::/tcp/29889
mem_swappiness: 70
entrypoint:
- "node"
- "--trace-warnings"
- "--experimental-json-modules"
- "--es-module-specifier-resolution=node"
- "--harmony-top-level-await"
- "dist/index"
# ports:
# - "29888:29888"