-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
214 lines (197 loc) · 4.48 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
version: "3.2"
services:
# the helper is only used to populate the shared volume
# please note that we are not able to use bind mounts on circleci unless we
# would use the machine images
helper:
image: ubuntu:18.04
container_name: e2e-helper
volumes:
- shared:/shared
command: ["true"]
relay:
image: ${TL_RELAY_IMAGE:-trustlines/relay}
container_name: relay
environment:
- TRUSTLINES_SYNC_TX_RELAY=1
- PGHOST
- PGUSER
- PGDATABASE
- PGPASSWORD
depends_on:
- node
- db
volumes:
- shared:/shared
- ./end2end-coverage:/end2end-coverage
ports:
- "127.0.0.1:5000:5000"
networks:
- internal
command: ["--config", "/shared/config.toml", "--coverage"]
restart: unless-stopped
index:
image: ${TL_INDEX_IMAGE:-trustlines/py-eth-index}
networks:
- internal
depends_on:
- db
- node
environment:
- PGHOST
- PGUSER
- PGDATABASE
- PGPASSWORD
restart: unless-stopped
command: runsync --jsonrpc http://node:8545 --waittime 200
createtables:
image: ${TL_INDEX_IMAGE:-trustlines/py-eth-index}
restart: on-failure
networks:
- internal
depends_on:
- db
environment:
- PGHOST
- PGUSER
- PGDATABASE
- PGPASSWORD
command: createtables
init:
image: ${TL_INDEX_IMAGE:-trustlines/py-eth-index}
restart: on-failure
networks:
- internal
depends_on:
- db
- createtables
environment:
- PGHOST
- PGUSER
- PGDATABASE
- PGPASSWORD
volumes:
- shared:/shared
- abi:/abi
command: importabi --addresses /shared/addresses.json
db:
image: postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
networks:
- internal
node:
image: trufflesuite/ganache:latest
container_name: node
restart: always
networks:
- internal
expose:
- "8545"
ports:
- "127.0.0.1:8545:8545"
volumes:
- shared:/shared
- ./logs:/logs
- ./data/ganache:/data/ganache
command:
[
"--wallet.accounts",
"0x5076246bed39923dcad97d901b4dd3bd33d333c0df82b2955382c7458afaa397,100000000000000000000000", # 0xD55685944D873132F59311e3e7d41950E0376f64
"0xca479cce7e1fceecbc26a993e18725d1989f3288d1d4da8db6cde25129410e67,100000000000000000000000", # 0xAf35760Ffaa13D4eFDF411F08d35F703ca44E345
"--miner.blockTime",
"0",
"--server.host",
"0.0.0.0",
]
contracts:
image: ${TL_CONTRACTS_IMAGE:-trustlines/contracts}
command: ["test", "--file", "/shared/addresses.json", "--jsonrpc", "http://node:8545", "--gas-price", "1065625000", "--keystore", "/shared/keystore/key", "--password", "test"]
container_name: contracts
depends_on:
- node
volumes:
- shared:/shared
- type: volume
source: abi
target: /opt/contracts/trustlines-contracts/build
volume:
nocopy: false
networks:
- internal
e2e:
image: ${TL_E2E_IMAGE:-trustlines/e2e}
container_name: e2e
networks:
- internal
depends_on:
- relay
volumes:
- shared:/clientlib/tests/e2e-config
nginx:
image: nginx:1.21-alpine
container_name: nginx
hostname: nginx
ports:
- "8001:8000"
volumes:
- nginx-shared:/nginx
depends_on:
- safe-relay-service
networks:
- internal
redis:
image: redis:5-alpine
ports:
- "6379:6379"
networks:
- internal
safe-relay-service:
image: ${TL_SAFE_RELAY_SERVICE_IMAGE}
container_name: safe-relay-service
env_file:
- .env.local.relay-service
depends_on:
- node
- db
- redis
ports:
- "8888:8888"
volumes:
- nginx-shared:/nginx
command: /app/docker/web/run_web.sh
networks:
- internal
worker:
image: ${TL_SAFE_RELAY_SERVICE_IMAGE}
env_file:
- .env.local.relay-service
depends_on:
- db
- redis
networks:
- internal
command: docker/web/celery/worker/run.sh
scheduler:
image: ${TL_SAFE_RELAY_SERVICE_IMAGE}
env_file:
- .env.local.relay-service
depends_on:
- db
- redis
networks:
- internal
command: docker/web/celery/scheduler/run.sh
networks:
internal:
external: false
driver: bridge
volumes:
abi:
shared:
nginx-shared:
logs: