-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose-published.yaml
More file actions
202 lines (187 loc) · 6.01 KB
/
docker-compose-published.yaml
File metadata and controls
202 lines (187 loc) · 6.01 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
# 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:-wss://0.rpc.testnet.amplica.io}
SIWF_NODE_RPC_URL: ${SIWF_NODE_RPC_URL:-https://0.rpc.testnet.amplica.io}
REDIS_URL: ${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
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:'
WEBHOOK_BASE_URL: ${WEBHOOK_BASE_URL:-http://mock-webhook-logger:3001/webhooks/content-publishing-service}
x-content-watcher-env: &content-watcher-env
STARTING_BLOCK: 759882
BLOCKCHAIN_SCAN_INTERVAL_SECONDS: 6
WEBHOOK_FAILURE_THRESHOLD: 4
CACHE_KEY_PREFIX: 'content-watcher:'
WEBHOOK_BASE_URL: ${WEBHOOK_BASE_URL:-http://mock-webhook-logger:3001/webhooks/content-publishing-service}
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:
- ${SERVICE_PORT_7}:6379
networks:
- gateway-net
volumes:
- redis_data:/data
frequency:
image: frequencychain/standalone-node:latest
# 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
ports:
- 9944:9944
networks:
- gateway-net
volumes:
- chainstorage:/data
healthcheck:
test: [
"CMD-SHELL",
"curl --silent --fail -H \"Content-Type: application/json\" -d '{\"id\":1, \"jsonrpc\":\"2.0\", \"method\": \"schemas_getBySchemaId\", \"params\": [11]}' http://localhost:9944/ | grep -qv '{\"jsonrpc\":\"2.0\",\"result\":null,\"id\":1}' || exit 1"
]
interval: 15s # Equivalent to the "15s" in Dockerfile
timeout: 15s # Equivalent to "0s" as a default timeout
retries: 3 # Retries is a new parameter for robustness
start_period: 0s
profiles:
- local-node
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
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_VOLUME:-ipfs_data}:/data/ipfs
profiles:
- ipfs
gateway-base:
profiles:
- skip
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:
- gateway-net
profiles:
- content-publishing
content-publishing-service-worker:
image: projectlibertylabs/content-publishing-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- ${SERVICE_PORT_4}:3000
environment:
<<: [*common-environment, *content-publishing-env]
START_PROCESS: content-publishing-worker
depends_on:
- redis
networks:
- gateway-net
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:
- gateway-net
profiles:
- content-watcher
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:
- gateway-net
profiles:
- account
account-service-worker:
image: projectlibertylabs/account-service:${DOCKER_TAG:-latest}
pull_policy: always
ports:
- "${SERVICE_PORT_6}:3000"
command: account-worker
environment:
<<: [*common-environment, *account-service-env]
depends_on:
- redis
networks:
- gateway-net
profiles:
- account
volumes:
ipfs_data:
chainstorage:
external: false
redis_data:
networks:
gateway-net: