-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
191 lines (179 loc) · 4.94 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
services:
# Existing era-test-node services
era-test-node-1:
build:
context: ./era-test-node
dockerfile: Dockerfile
args:
CHAIN_ID: 500
PORT: 8012
ports:
- "8012:8012"
networks:
- era-network
era-test-node-2:
build:
context: ./era-test-node
dockerfile: Dockerfile
args:
CHAIN_ID: 501
PORT: 8013
ports:
- "8013:8013"
networks:
- era-network
slingshot-init:
build:
context: ./slingshot
dockerfile: Dockerfile
args:
PRIV_KEY: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e"
CHAIN_1_RPC: "http://host.docker.internal:8012/"
CHAIN_2_RPC: "http://host.docker.internal:8013/"
networks:
- era-network
depends_on:
- era-test-node-1
- era-test-node-2
slingshot:
build:
context: ./slingshot/cli
dockerfile: Dockerfile
args:
PRIV_KEY: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e"
INTEROP_ADDR: "0x7122bb051DE72eAD9CE1F6374BEaCBc38E81fdb1"
CHAIN_1_RPC: "http://host.docker.internal:8012/"
CHAIN_2_RPC: "http://host.docker.internal:8013/"
networks:
- era-network
depends_on:
slingshot-init:
condition: service_completed_successfully
# Block Explorer for era-test-node-1
explorer-node1-app:
platform: linux/amd64
image: "matterlabs/block-explorer-app:latest"
ports:
- '3010:3010'
depends_on:
- explorer-node1-api
restart: unless-stopped
volumes:
- ./config.external.js:/usr/src/app/packages/app/dist/config.js
networks:
- era-network
explorer-node1-worker:
platform: linux/amd64
image: "matterlabs/block-explorer-worker:latest"
environment:
- PORT=3001
- LOG_LEVEL=verbose
- NODE_ENV=development
- DATABASE_HOST=explorer-node1-postgres
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres
- DATABASE_NAME=block-explorer-node1
- BLOCKCHAIN_RPC_URL=http://host.docker.internal:8012
- DATA_FETCHER_URL=http://explorer-node1-data-fetcher:3040
- BATCHES_PROCESSING_POLLING_INTERVAL=1000
restart: unless-stopped
networks:
- era-network
explorer-node1-data-fetcher:
platform: linux/amd64
image: "matterlabs/block-explorer-data-fetcher:latest"
environment:
- PORT=3040
- LOG_LEVEL=verbose
- NODE_ENV=development
- BLOCKCHAIN_RPC_URL=http://host.docker.internal:8012
ports:
- '3040:3040'
restart: unless-stopped
networks:
- era-network
explorer-node1-api:
platform: linux/amd64
image: "matterlabs/block-explorer-api:latest"
environment:
- PORT=3020
- METRICS_PORT=3005
- LOG_LEVEL=verbose
- NODE_ENV=development
- DATABASE_URL=postgres://postgres:postgres@explorer-node1-postgres:5432/block-explorer-node1
ports:
- '3020:3020'
depends_on:
- explorer-node1-worker
restart: unless-stopped
networks:
- era-network
explorer-node1-postgres:
image: "postgres:14"
tmpfs:
- /var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=block-explorer-node1
networks:
- era-network
explorer-node2-worker:
platform: linux/amd64
image: "matterlabs/block-explorer-worker:latest"
environment:
- PORT=3002
- LOG_LEVEL=verbose
- NODE_ENV=development
- DATABASE_HOST=explorer-node2-postgres
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres
- DATABASE_NAME=block-explorer-node2
- BLOCKCHAIN_RPC_URL=http://host.docker.internal:8013
- DATA_FETCHER_URL=http://explorer-node2-data-fetcher:3041
- BATCHES_PROCESSING_POLLING_INTERVAL=1000
restart: unless-stopped
networks:
- era-network
explorer-node2-data-fetcher:
platform: linux/amd64
image: "matterlabs/block-explorer-data-fetcher:latest"
environment:
- PORT=3041
- LOG_LEVEL=verbose
- NODE_ENV=development
- BLOCKCHAIN_RPC_URL=http://host.docker.internal:8013
ports:
- '3041:3041'
restart: unless-stopped
networks:
- era-network
explorer-node2-api:
platform: linux/amd64
image: "matterlabs/block-explorer-api:latest"
environment:
- PORT=3021
- METRICS_PORT=3006
- LOG_LEVEL=verbose
- NODE_ENV=development
- DATABASE_URL=postgres://postgres:postgres@explorer-node2-postgres:5432/block-explorer-node2
ports:
- '3021:3021'
depends_on:
- explorer-node2-worker
restart: unless-stopped
networks:
- era-network
explorer-node2-postgres:
image: "postgres:14"
tmpfs:
- /var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=block-explorer-node2
networks:
- era-network
networks:
era-network:
driver: bridge