-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathdocker-compose.yml
335 lines (321 loc) · 10.2 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# Complete joystream development network
version: '3.4'
services:
joystream-node:
image: joystream/node:$JOYSTREAM_NODE_TAG
restart: unless-stopped
container_name: joystream-node
volumes:
- chain-data:/data
command: --dev --alice --validator --pruning=archive --unsafe-ws-external --unsafe-rpc-external --rpc-methods Safe --rpc-cors=all --log runtime --base-path /data
ports:
- 9944:9944
- 9933:9933
colossus-1:
image: node:14
container_name: colossus-1
restart: on-failure
volumes:
- colossus-1-data:/data
- colossus-1-keystore:/keystore
- colossus-1-logs:/logs
- type: bind
source: .
target: /joystream
working_dir: /joystream/storage-node
ports:
- 3333:3333
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
# ACCOUNT_URI overrides command line arg --accountUri
- ACCOUNT_URI=${COLOSSUS_1_TRANSACTOR_URI}
command: [
'yarn', 'storage-node', 'server', '--worker=${COLOSSUS_1_WORKER_ID}', '--port=3333', '--uploads=/data',
'--sync', '--syncInterval=1',
'--queryNodeEndpoint=${COLOSSUS_QUERY_NODE_URL}',
'--apiUrl=${JOYSTREAM_NODE_WS}',
'--logFilePath=/logs'
]
distributor-1:
image: node:14
container_name: distributor-1
restart: on-failure
volumes:
- distributor-1-data:/data
- distributor-1-cache:/cache
- distributor-1-logs:/logs
- type: bind
source: .
target: /joystream
# let the working_dir be the distributor node to pickup the config.yml file
working_dir: /joystream/distributor-node
ports:
- 3334:3334
- 127.0.0.1:4334:4334
env_file:
# relative to working directory where docker-compose was run from
- .env
# Node configuration can be overriden via env, for exampe:
environment:
JOYSTREAM_DISTRIBUTOR__ID: distributor-1
JOYSTREAM_DISTRIBUTOR__ENDPOINTS__QUERY_NODE: ${DISTRIBUTOR_QUERY_NODE_URL}
JOYSTREAM_DISTRIBUTOR__KEYS: "[{\"suri\":\"${DISTRIBUTOR_1_ACCOUNT_URI}\"}]"
JOYSTREAM_DISTRIBUTOR__WORKER_ID: ${DISTRIBUTOR_1_WORKER_ID}
JOYSTREAM_DISTRIBUTOR__PUBLIC_API__PORT: 3334
JOYSTREAM_DISTRIBUTOR__OPERATOR_API__PORT: 4334
JOYSTREAM_DISTRIBUTOR__ENDPOINTS__JOYSTREAM_NODE_WS: ${JOYSTREAM_NODE_WS}
JOYSTREAM_DISTRIBUTOR__DIRECTORIES__ASSETS: /data
JOYSTREAM_DISTRIBUTOR__DIRECTORIES__CACHE_STATE: /cache
JOYSTREAM_DISTRIBUTOR__LOGS__FILE__PATH: /logs
# JOYSTREAM_DISTRIBUTOR__ENDPOINTS__ELASTIC_SEARCH: es-endpoint
# JOYSTREAM_DISTRIBUTOR__LOGS__CONSOLE: "off"
# JOYSTREAM_DISTRIBUTOR__LOGS__FILE: "off"
# JOYSTREAM_DISTRIBUTOR__LOGS__ELASTIC: "off"
# JOYSTREAM_DISTRIBUTOR__LIMITS__STORAGE: 50G
# JOYSTREAM_DISTRIBUTOR__BUCKETS: "[\"1:0\",\"1:1\"]"
command: ['yarn', 'joystream-distributor', 'start']
colossus-2:
image: node:14
container_name: colossus-2
restart: on-failure
volumes:
- colossus-2-data:/data
- colossus-2-keystore:/keystore
- colossus-2-logs:/logs
- type: bind
source: .
target: /joystream
working_dir: /joystream/storage-node
ports:
- 3335:3333
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
# ACCOUNT_URI overrides command line arg --accountUri
- ACCOUNT_URI=${COLOSSUS_2_TRANSACTOR_URI}
command: [
'yarn', 'storage-node', 'server', '--worker=${COLOSSUS_2_WORKER_ID}', '--port=3333', '--uploads=/data',
'--sync', '--syncInterval=1',
'--queryNodeEndpoint=${COLOSSUS_QUERY_NODE_URL}',
'--apiUrl=${JOYSTREAM_NODE_WS}',
'--logFilePath=/logs'
]
distributor-2:
image: node:14
container_name: distributor-2
restart: on-failure
volumes:
- distributor-2-data:/data
- distributor-2-cache:/cache
- distributor-2-logs:/logs
- type: bind
source: .
target: /joystream
# let the working_dir be the distributor node to pickup the config.yml file
working_dir: /joystream/distributor-node
ports:
- 3336:3334
- 127.0.0.1:4336:4334
env_file:
# relative to working directory where docker-compose was run from
- .env
# Node configuration can be overriden via env, for exampe:
environment:
JOYSTREAM_DISTRIBUTOR__ID: distributor-2
JOYSTREAM_DISTRIBUTOR__ENDPOINTS__QUERY_NODE: ${DISTRIBUTOR_QUERY_NODE_URL}
JOYSTREAM_DISTRIBUTOR__KEYS: "[{\"suri\":\"${DISTRIBUTOR_2_ACCOUNT_URI}\"}]"
JOYSTREAM_DISTRIBUTOR__WORKER_ID: ${DISTRIBUTOR_2_WORKER_ID}
JOYSTREAM_DISTRIBUTOR__PUBLIC_API__PORT: 3334
JOYSTREAM_DISTRIBUTOR__OPERATOR_API__PORT: 4334
JOYSTREAM_DISTRIBUTOR__ENDPOINTS__JOYSTREAM_NODE_WS: ${JOYSTREAM_NODE_WS}
JOYSTREAM_DISTRIBUTOR__DIRECTORIES__ASSETS: /data
JOYSTREAM_DISTRIBUTOR__DIRECTORIES__CACHE_STATE: /cache
JOYSTREAM_DISTRIBUTOR__LOGS__FILE__PATH: /logs
# JOYSTREAM_DISTRIBUTOR__ENDPOINTS__ELASTIC_SEARCH: es-endpoint
# JOYSTREAM_DISTRIBUTOR__LOGS__CONSOLE: "off"
# JOYSTREAM_DISTRIBUTOR__LOGS__FILE: "off"
# JOYSTREAM_DISTRIBUTOR__LOGS__ELASTIC: "off"
# JOYSTREAM_DISTRIBUTOR__LIMITS__STORAGE: 50G
# JOYSTREAM_DISTRIBUTOR__BUCKETS: "[\"1:0\",\"1:1\"]"
command: ['yarn', 'joystream-distributor', 'start']
db:
image: postgres:12
container_name: db
restart: unless-stopped
ports:
- '127.0.0.1:${DB_PORT}:${DB_PORT}'
volumes:
- query-node-data:/var/lib/postgresql/data
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${INDEXER_DB_NAME}
PGPORT: ${DB_PORT}
graphql-server:
image: node:14
container_name: graphql-server
restart: unless-stopped
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
- DB_HOST=db
- WARTHOG_APP_PORT=${GRAPHQL_SERVER_PORT}
- GRAPHQL_PLAYGROUND_ENDPOINT=${GRAPHQL_PLAYGROUND_ENDPOINT}
- GRAPHQL_PLAYGROUND_SUBSCRIPTION_ENDPOINT=${GRAPHQL_PLAYGROUND_SUBSCRIPTION_ENDPOINT}
- GRAPHQL_PLAYGROUND_CDN_URL=${GRAPHQL_PLAYGROUND_CDN_URL}
ports:
- "${GRAPHQL_SERVER_PORT}:${GRAPHQL_SERVER_PORT}"
depends_on:
- db
volumes:
- type: bind
source: .
target: /joystream
working_dir: /joystream
command: ['yarn', 'workspace', 'query-node-root', 'query-node:start:prod']
processor:
image: node:14
container_name: processor
restart: unless-stopped
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
- INDEXER_ENDPOINT_URL=${PROCESSOR_INDEXER_GATEWAY}
- TYPEORM_HOST=db
- TYPEORM_DATABASE=${DB_NAME}
- BATCH_SIZE=100
- QUEUE_FACTOR=1
- QUEUE_MAX_CAP_FACTOR=4
depends_on:
- db
volumes:
- type: bind
source: .
target: /joystream
working_dir: /joystream
command: ['yarn', 'workspace', 'query-node-root', 'processor:start']
indexer:
image: joystream/hydra-indexer:v4.0.0-alpha.7
container_name: indexer
restart: unless-stopped
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
- DB_NAME=${INDEXER_DB_NAME}
- INDEXER_WORKERS=5
- REDIS_URI=redis://redis:6379/0
- WS_PROVIDER_ENDPOINT_URI=${JOYSTREAM_NODE_WS}
- DB_HOST=db
depends_on:
- db
- redis
volumes:
- ./types/augment/all/defs.json:/home/hydra/packages/hydra-indexer/types.json
command: >
sh -c "yarn db:bootstrap && yarn start:prod"
hydra-indexer-gateway:
image: joystream/hydra-indexer-gateway:4.0.0-alpha.7
container_name: hydra-indexer-gateway
restart: unless-stopped
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
- WARTHOG_STARTER_DB_DATABASE=${INDEXER_DB_NAME}
- WARTHOG_STARTER_DB_HOST=db
- WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
- WARTHOG_STARTER_DB_PORT=${DB_PORT}
- WARTHOG_STARTER_DB_USERNAME=${DB_USER}
- WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
- WARTHOG_APP_PORT=${HYDRA_INDEXER_GATEWAY_PORT}
- PORT=${HYDRA_INDEXER_GATEWAY_PORT}
- DEBUG=*
ports:
- "${HYDRA_INDEXER_GATEWAY_PORT}:${HYDRA_INDEXER_GATEWAY_PORT}"
depends_on:
- db
- redis
redis:
image: redis:6.0-alpine
container_name: redis
restart: unless-stopped
ports:
- "127.0.0.1:6379:6379"
faucet:
image: joystream/faucet:carthage
restart: unless-stopped
container_name: faucet
env_file:
- .env
environment:
- INVITER_KEY=${INVITER_KEY}
- PORT=3002
- PROVIDER=${JOYSTREAM_NODE_WS}
- SENDGRID_API_KEY=${SENDGRID_API_KEY}
- HCAPTCHA_SECRET=${HCAPTCHA_SECRET}
- ALERT_TO_EMAIL=${ALERT_TO_EMAIL}
- ALERT_FROM_EMAIL=${ALERT_FROM_EMAIL}
- BALANCE_CREDIT=${BALANCE_CREDIT}
- BALANCE_LOCKED=${BALANCE_LOCKED}
ports:
- "3002:3002"
orion:
container_name: orion
image: joystream/orion
environment:
- ORION_PORT=6116
- ORION_MONGO_HOSTNAME=mongo
- ORION_FEATURED_CONTENT_SECRET=password123
- ORION_ADMIN_SECRET=password123
- ORION_QUERY_NODE_URL=http://graphql-server:${GRAPHQL_SERVER_PORT}/graphql
ports:
- "6116:6116"
depends_on:
- mongo
restart: always
mongo:
restart: always
container_name: mongo
image: library/mongo:4.4
volumes:
- orion-mongo-data:/data/db
volumes:
chain-data:
driver: local
query-node-data:
driver: local
colossus-1-data:
driver: local
colossus-1-keystore:
driver: local
colossus-1-logs:
driver: local
colossus-2-data:
driver: local
colossus-2-keystore:
driver: local
colossus-2-logs:
driver: local
distributor-1-logs:
driver: local
distributor-1-cache:
driver: local
distributor-1-data:
driver: local
distributor-2-logs:
driver: local
distributor-2-cache:
driver: local
distributor-2-data:
driver: local
orion-mongo-data:
driver: local