-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
237 lines (222 loc) · 6.56 KB
/
docker-compose.yaml
File metadata and controls
237 lines (222 loc) · 6.56 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
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
x-common-environment: &common-environment
FREQUENCY_API_WS_URL: ${FREQUENCY_API_WS_URL:-ws://frequency:9944}
SIWF_NODE_RPC_URL: ${SIWF_NODE_RPC_URL:-http://localhost:9944}
REDIS_URL: 'redis://redis:6379'
PROVIDER_ID: ${PROVIDER_ID:-1}
PROVIDER_ACCOUNT_SEED_PHRASE: ${PROVIDER_ACCOUNT_SEED_PHRASE:-//Alice}
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'
IPFS_ENDPOINT: ${IPFS_ENDPOINT:-http://ipfs:5001/api/v0}
IPFS_GATEWAY_URL: ${IPFS_GATEWAY_URL:-https://ipfs.io/ipfs/[CID]}
IPFS_BASIC_AUTH_USER: ${IPFS_BASIC_AUTH_USER:-""}
IPFS_BASIC_AUTH_SECRET: ${IPFS_BASIC_AUTH_SECRET:-""}
QUEUE_HIGH_WATER: 1000
HTTP_RESPONSE_TIMEOUT_MS: ${HTTP_RESPONSE_TIMEOUT_MS:-29999}
LOG_LEVEL: ${LOG_LEVEL:-info}
PRETTY: ${PRETTY:-compact}
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-account-service-env: &account-service-env
BLOCKCHAIN_SCAN_INTERVAL_SECONDS: 1
TRUST_UNFINALIZED_BLOCKS: true
WEBHOOK_BASE_URL: '${WEBHOOK_BASE_URL:-http://mock-webhook-logger:3001/webhooks/account-service}'
CACHE_KEY_PREFIX: 'account:'
SIWF_V2_URI_VALIDATION: 'localhost'
services:
redis:
image: redis:7.0
ports:
- 6379:6379
networks:
- gateway-net
command:
- /etc/redis/redis.conf
volumes:
- redis_data:/data
- ./redis:/etc/redis:ro
frequency:
image: frequencychain/standalone-node:v2.0.0-rc3
# If auto-pull fails due to a platform mismatch, uncomment below to force x86 emulation.
# Available Frequency builds are: [amd64, arm64]
# 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
healthcheck:
test: ["CMD", "bash", "-c", "curl -X POST -H \"Content-Type: application/json\" -d '{\"jsonrpc\":\"2.0\",\"method\":\"system_health\",\"params\":[],\"id\":1}' http://127.0.0.1:9944 > /dev/null 2>&1"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 9944:9944
networks:
- gateway-net
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:
- gateway-net
volumes:
- ipfs_data:${IPFS_VOLUME:-/data/ipfs}
gateway-base:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
build:
context: .
dockerfile: Docker/Dockerfile.dev
tags:
- gateway-dev:latest
volumes:
- ./:/app
- gateway_base_node_cache:/app/node_modules
content-publishing-service-api:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
ports:
- ${SERVICE_PORT_0:-3010}:3000
command: make start-content-publishing-api
environment:
<<: [*common-environment, *content-publishing-env]
START_PROCESS: content-publishing-api
volumes:
- ./:/app
- content_publishing_api_node_cache:/app/node_modules
depends_on:
- redis
- ipfs
- gateway-base
networks:
- gateway-net
content-publishing-service-worker:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
ports:
- ${SERVICE_PORT_4:-3020}:3000
command: make start-content-publishing-worker
environment:
<<: [*common-environment, *content-publishing-env]
START_PROCESS: content-publishing-worker
volumes:
- ./:/app
- content_publishing_worker_node_cache:/app/node_modules
depends_on:
- redis
- ipfs
- gateway-base
networks:
- gateway-net
content-watcher-service:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
ports:
- ${SERVICE_PORT_1:-3011}:3000
command: make start-content-watcher
environment:
<<: [*common-environment, *content-watcher-env]
volumes:
- ./:/app
- content_watcher_node_cache:/app/node_modules
depends_on:
- redis
- ipfs
- gateway-base
networks:
- gateway-net
account-service-api:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
ports:
- ${SERVICE_PORT_3:-3013}:3000
environment:
<<: [*common-environment, *account-service-env]
command: make start-account-api
volumes:
- ./:/app
- account_api_node_cache:/app/node_modules
depends_on:
- redis
- gateway-base
networks:
- gateway-net
account-service-worker:
pull_policy: never
image: gateway-dev:latest
user: "1001:1001"
ports:
- "${SERVICE_PORT_6:-3023}:3000"
command: make start-account-worker
environment:
<<: [*common-environment, *account-service-env]
volumes:
- ./:/app
- account_worker_node_cache:/app/node_modules
depends_on:
- redis
- gateway-base
networks:
- gateway-net
mock-webhook-logger:
pull_policy: never
image: mock-webhook-logger:latest
user: "1001:1001"
build:
context: .
dockerfile: Docker/Dockerfile.mock-webhook-logger
tags:
- mock-webhook-logger:latest
ports:
- ${ACCOUNT_WEBHOOK_PORT:-3001}:3001
profiles:
- webhook
networks:
- gateway-net
volumes:
ipfs_data:
chainstorage:
redis_data:
bull_data:
account_api_node_cache:
account_worker_node_cache:
content_publishing_api_node_cache:
content_publishing_worker_node_cache:
content_watcher_node_cache:
gateway_base_node_cache:
networks:
gateway-net: