This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
192 lines (183 loc) · 4.05 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
version: "3.6"
networks:
main:
services:
api:
hostname: launchpad-api
image: appliedblockchain/launchpad-api:latest
build:
context: .
dockerfile: ./api/Dockerfile
args:
- NPM_TOKEN
environment:
- NODE_ENV=staging
- PROVIDER=http://parity1:8545
# TODO: change Sentry DSN with the correct sentry DSN
- SENTRY_DSN=http://6f20a6d7d8154e1f93593c634f943f7d@sentry-web:9000/3
- FORCE_COLOR=1
networks:
- main
ports:
- 3000:3000
depends_on:
- parity1
- parity2
- parity3
deploy: &deploy_defaults
replicas: 3
update_config:
parallelism: 1
delay: 1s
restart_policy: &restart_policy
condition: any
delay: 5s
max_attempts: 10
window: 60s
react:
hostname: launchpad-react
image: appliedblockchain/launchpad-react:latest
build:
context: ./react
args:
- NPM_TOKEN
- BASIC_AUTH_HTPASSWD=admin:$$apr1$$6SESoef2$$haXLi9RTR.MOe76pJGH8r.
- TEST_MODE # if set, the react app will be built to use localhost as a backend
ports:
- 80:80
networks:
- main
deploy:
<<: *deploy_defaults
mode: global
depends_on:
- api
explorer:
hostname: launchpad-explorer
image: appliedblockchain/launchpad-explorer:latest
build:
context: ./explorer
environment:
ETHEREUM_JSONRPC_ENDPOINT: http://parity1:8545/
# CONFIG_URL: http://api:3000/api/block-explorer-config
networks:
- main
ports:
- 3001:3000
depends_on:
- parity1
deploy:
mode: global
restart_policy:
<<: *restart_policy
parity1:
hostname: launchpad-parity1
build:
context: ./stack
dockerfile: Dockerfile-parity
args:
- PARITY_ID=1
- NPM_TOKEN
- S3_ACCESS_KEY_ID
- S3_SECRET_ACCESS_KEY
- S3_BUCKET_NAME
environment:
- PARITY_ID=1
networks:
- main
ports:
- 8180:8180
- 8545:8545
- 8546:8546
- 30303:30303
image: appliedblockchain/launchpad-parity1:latest
volumes:
- parity1_data:/parity/data
depends_on:
- discovery
deploy:
<<: *deploy_defaults
replicas: 1
placement:
constraints:
- node.labels.node_id == 1
parity2:
hostname: launchpad-parity2
build:
context: ./stack
dockerfile: Dockerfile-parity
args:
- PARITY_ID=2
- NPM_TOKEN
environment:
- PARITY_ID=2
networks:
- main
image: appliedblockchain/launchpad-parity2:latest
volumes:
- parity2_data:/parity/data
depends_on:
- discovery
deploy:
<<: *deploy_defaults
replicas: 1
placement:
constraints:
- node.labels.node_id == 2
parity3:
hostname: launchpad-parity3
build:
context: ./stack
dockerfile: Dockerfile-parity
args:
- PARITY_ID=3
- NPM_TOKEN
environment:
- PARITY_ID=3
networks:
- main
image: appliedblockchain/launchpad-parity3:latest
volumes:
- parity3_data:/parity/data
depends_on:
- discovery
deploy:
<<: *deploy_defaults
replicas: 1
placement:
constraints:
- node.labels.node_id == 2
discovery:
hostname: discovery
image: redis
ports:
- 6379:6379
networks:
- main
volumes:
- discovery:/data
deploy:
<<: *deploy_defaults
replicas: 1
placement:
constraints:
- node.labels.node_id == 1
# logspout:
# image: gliderlabs/logspout
# deploy:
# mode: global
# environment:
# - SYSLOG_HOST=logs.papertrailapp.com:12345
# # NOTE: you have to change the papertrail url with the correct one
# command: syslog+tls://$$SYSLOG_HOST
# networks:
# - main
# volumes:
# - type: bind
# target: /var/run/docker.sock
# source: /var/run/docker.sock
volumes:
discovery:
parity1_data:
parity2_data:
parity3_data: