-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
285 lines (265 loc) · 7.94 KB
/
docker-compose.yaml
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
x-common-environment: &common-environment
FREQUENCY_API_WS_URL: ${FREQUENCY_API_WS_URL}
SIWF_NODE_RPC_URL: ${SIWF_NODE_RPC_URL}
REDIS_URL: 'redis://redis:6379'
PROVIDER_ID: ${PROVIDER_ID}
PROVIDER_ACCOUNT_SEED_PHRASE: ${PROVIDER_ACCOUNT_SEED_PHRASE}
WEBHOOK_FAILURE_THRESHOLD: 3
WEBHOOK_RETRY_INTERVAL_SECONDS: 10
HEALTH_CHECK_MAX_RETRIES: 4
HEALTH_CHECK_MAX_RETRY_INTERVAL_SECONDS: 10
HEALTH_CHECK_SUCCESS_THRESHOLD: 10
CAPACITY_LIMIT: '{"type":"percentage", "value":80}'
SIWF_URL: 'https://projectlibertylabs.github.io/siwf/v1/ui'
SIWF_DOMAIN: 'localhost'
IPFS_ENDPOINT: ${IPFS_ENDPOINT}
IPFS_GATEWAY_URL: ${IPFS_GATEWAY_URL}
IPFS_BASIC_AUTH_USER: ${IPFS_BASIC_AUTH_USER}
IPFS_BASIC_AUTH_SECRET: ${IPFS_BASIC_AUTH_SECRET}
QUEUE_HIGH_WATER: 1000
CHAIN_ENVIRONMENT: dev
DEBUG: true
x-content-publishing-env: &content-publishing-env
START_PROCESS: content-publishing-api
FILE_UPLOAD_MAX_SIZE_IN_BYTES: 500000000
FILE_UPLOAD_COUNT_LIMIT: 10
ASSET_EXPIRATION_INTERVAL_SECONDS: 300
BATCH_INTERVAL_SECONDS: 12
BATCH_MAX_COUNT: 1000
ASSET_UPLOAD_VERIFICATION_DELAY_SECONDS: 5
CACHE_KEY_PREFIX: 'content-publishing:'
x-content-watcher-env: &content-watcher-env
STARTING_BLOCK: 759882
BLOCKCHAIN_SCAN_INTERVAL_SECONDS: 6
WEBHOOK_FAILURE_THRESHOLD: 4
CACHE_KEY_PREFIX: 'content-watcher:'
x-graph-service-env: &graph-service-env
DEBOUNCE_SECONDS: 10
GRAPH_ENVIRONMENT_TYPE: Mainnet
RECONNECTION_SERVICE_REQUIRED: false
PROVIDER_BASE_URL: 'http://social-app-template-backend:3001/webhooks/graph-service'
CACHE_KEY_PREFIX: 'graph:'
AT_REST_ENCRYPTION_KEY_SEED: 'This should get injected as a secret'
x-account-service-env: &account-service-env
SIWF_V2_URI_VALIDATION: 'localhost'
BLOCKCHAIN_SCAN_INTERVAL_SECONDS: 1
TRUST_UNFINALIZED_BLOCKS: true
GRAPH_ENVIRONMENT_TYPE: Mainnet
WEBHOOK_BASE_URL: 'http://social-app-template-backend:3001/webhooks/account-service'
CACHE_KEY_PREFIX: 'account:'
x-social-app-template-backend: &social-app-template-backend
ACCOUNT_SERVICE_URL: 'http://account-service-api:3000'
CONTENT_PUBLISHER_URL: 'http://content-publishing-service-api:3000'
CONTENT_WATCHER_URL: 'http://content-watcher-service:3000'
GRAPH_SERVICE_URL: 'http://graph-service-api:3000'
IPFS_UA_GATEWAY_URL: ${IPFS_UA_GATEWAY_URL}
NODE_ENV: development
WEBHOOK_BASE_URL: 'http://social-app-template-backend:3001/webhooks'
x-social-app-template-frontend: &social-app-template-frontend
REACT_APP_BACKEND_URL: 'http://localhost:${SERVICE_PORT_8}'
REACT_APP_TITLE: ${REACT_APP_TITLE}
REACT_APP_HEADER_BG_COLOR: ${REACT_APP_HEADER_BG_COLOR}
services:
redis:
image: redis:latest
ports:
- ${SERVICE_PORT_7}:6379
networks:
- social-app-backend
volumes:
- redis_data:/data/redis
frequency:
image: dsnp/instant-seal-node-with-deployed-schemas:latest
# We need to specify the platform because it's the only image
# built by Frequency at the moment, and auto-pull won't work otherwise
platform: linux/amd64
# Uncomment SEALING_MODE and SEALING_INTERVAL if you want to use interval sealing.
# Other options you may want to add depending on your test scenario.
environment:
- SEALING_MODE=interval
- SEALING_INTERVAL=1
# - CREATE_EMPTY_BLOCKS=true
# The 'command' may contain additional CLI options to the Frequency node,
# such as:
# --state-pruning=archive
command: --offchain-worker=always --enable-offchain-indexing=true
ports:
- 9944:9944
networks:
- social-app-backend
volumes:
- chainstorage:/data
profiles:
- local-node
ipfs:
image: ipfs/kubo:latest
ports:
- 4001:4001
- 127.0.0.1:5001:5001
- 127.0.0.1:8080:8080
networks:
- social-app-backend
volumes:
- ${IPFS_VOLUME:-ipfs_data}:/data/ipfs
profiles:
- ipfs
# labels:
# - 'portical.upnp.forward=4401:4401'
content-publishing-service-api:
image: projectlibertylabs/content-publishing-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- ${SERVICE_PORT_0}:3000
environment:
<<: [*common-environment, *content-publishing-env]
depends_on:
- redis
networks:
- social-app-backend
profiles:
- content_publishing
content-publishing-service-worker:
image: projectlibertylabs/content-publishing-service:${DOCKER_TAG:-latest}
pull_policy: always
environment:
<<: [*common-environment, *content-publishing-env]
START_PROCESS: content-publishing-worker
depends_on:
- redis
networks:
- social-app-backend
profiles:
- content_publishing
content-watcher-service:
image: projectlibertylabs/content-watcher-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- ${SERVICE_PORT_1}:3000
environment:
<<: [*common-environment, *content-watcher-env]
depends_on:
- redis
networks:
- social-app-backend
profiles:
- content_watcher
graph-service-api:
image: projectlibertylabs/graph-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- ${SERVICE_PORT_2}:3000
environment:
<<: [*common-environment, *graph-service-env]
START_PROCESS: graph-api
depends_on:
- redis
networks:
- social-app-backend
profiles:
- graph
graph-service-worker:
image: projectlibertylabs/graph-service:${DOCKER_TAG:-latest}
pull_policy: always
environment:
<<: [*common-environment, *graph-service-env]
START_PROCESS: graph-worker
depends_on:
- redis
networks:
- social-app-backend
profiles:
- graph
account-service-api:
image: projectlibertylabs/account-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- ${SERVICE_PORT_3}:3000
command: account-api
environment:
<<: [*common-environment, *account-service-env]
depends_on:
- redis
networks:
- social-app-backend
profiles:
- account
account-service-worker:
image: projectlibertylabs/account-service:${DOCKER_TAG:-latest}
pull_policy: always
command: account-worker
environment:
<<: [*common-environment, *account-service-env]
depends_on:
- redis
networks:
- social-app-backend
profiles:
- account
social-app-template-backend:
pull_policy: never
image: social-app-backend
build:
context: ./backend
dockerfile: dev.Dockerfile
tags:
- social-app-backend:latest
ports:
- ${SERVICE_PORT_8}:3000
- ${SERVICE_PORT_9}:3001
environment:
<<: [*common-environment, *social-app-template-backend]
IPFS_GATEWAY_URL: 'http://ipfs:8080'
volumes:
- ./backend:/app
- ${CONTENT_DB_VOLUME}:/app/db
- backend_node_cache:/app/node_modules
networks:
- social-app-backend
depends_on:
- content-publishing-service-api
- content-publishing-service-worker
- content-watcher-service
- account-service-api
- account-service-worker
- graph-service-api
- graph-service-worker
profiles:
- backend
social-app-template-frontend:
pull_policy: never
image: social-app-frontend
build:
context: ./frontend
dockerfile: dev.Dockerfile
tags:
- social-app-frontend:latest
ports:
- ${FRONTEND_PORT:-3000}:3000
environment:
<<: *social-app-template-frontend
volumes:
- ./frontend:/app
- frontend_node_cache:/app/node_modules
networks:
- social-app-backend
depends_on:
- content-publishing-service-api
- content-publishing-service-worker
- content-watcher-service
- account-service-api
- account-service-worker
- graph-service-api
- graph-service-worker
- social-app-template-backend
profiles:
- frontend
volumes:
ipfs_data:
backend_node_cache:
frontend_node_cache:
redis_data:
content_db:
chainstorage:
external: false
networks:
social-app-backend: