-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
211 lines (200 loc) · 4.53 KB
/
docker-compose.yml
File metadata and controls
211 lines (200 loc) · 4.53 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
version: "3.8"
networks:
default:
name: ergo-explorer
ergo-node:
external: true
volumes:
ergo_redis:
external: true
services:
# Postgresql database
db:
build:
context: ./db
args:
EXPLORER_VERSION: 9.17.4
# -- Uncomment and edit if wanting to set custom work_mem value
# -- https://www.postgresql.org/docs/current/runtime-config-resource.html
# command: ["postgres", "-c", "work_mem=4MB"]
shm_size: 18g
environment:
POSTGRES_DB: ergo
POSTGRES_USER: ergo
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
volumes:
# Mapped volume for easier Postgres upgrades.
# Make sure the path exists or edit it here.
# See also readme_pg_upgrade.md
- /var/lib/explorer_pg/15/data:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Redis
redis:
image: redis:latest
restart: unless-stopped
command: ["redis-server"]
ports:
- "127.0.0.1:6379:6379"
volumes:
- ergo_redis:/usr/local/etc/redis
logging:
options:
max-size: "10m"
max-file: "3"
# Redis request cache
redis_rc:
image: redis:latest
restart: unless-stopped
command: ["redis-server"]
expose:
- "6379"
logging:
options:
max-size: "10m"
max-file: "3"
# Explorer backend chain-grabber
grabber:
build:
context: ./explorer-backend-9.17.4
dockerfile: chain-grabber.Dockerfile
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
volumes:
- ./explorer-backend.conf:/explorer-backend.conf:ro
networks:
- default
- ergo-node
command: /explorer-backend.conf
links:
- "db"
- "redis_rc"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Mempool tracker
utx-tracker:
build:
context: ./explorer-backend-9.17.4
dockerfile: utx-tracker.Dockerfile
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
volumes:
- ./explorer-backend.conf:/explorer-backend.conf:ro
networks:
- default
- ergo-node
command: /explorer-backend.conf
links:
- "db"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Mempool broadcaster
utx-broadcaster:
build:
context: ./explorer-backend-9.17.4
dockerfile: utx-broadcaster.Dockerfile
volumes:
- ./explorer-backend.conf:/explorer-backend.conf:ro
networks:
- default
- ergo-node
command: /explorer-backend.conf
links:
- "redis"
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Explorer API
api:
build:
context: ./explorer-backend-9.17.4
dockerfile: explorer-api.Dockerfile
env_file:
# Defines POSTGRES_PASSWORD
- ./db/db.secret
volumes:
- ./explorer-backend.conf:/explorer-backend.conf:ro
command: /explorer-backend.conf
links:
- "db"
- "redis"
ports:
- 8080:8080
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# Explorer UI
ui:
build:
context: ./ui
args:
# Set this to the url the api should be accessed at: http(s)://<your-ip-or-domain>:8080
API: http://yourexternalIP:8080
# Name of the network (mainnet, testnet, devnet, ...)
LABEL: "Mainnet"
links:
- "api"
ports:
- 3000:3000
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
# GraphQL
graphql:
build:
context: ./graphql
args:
VERSION: "0.5.3"
environment:
# database host address
DB_HOST: db
# database host port
DB_PORT: 5432
# database name
DB_NAME: ergo
# database user name
DB_USER_NAME: ergo
# ergo node address and port
ERGO_NODE_ADDRESS: http://172.17.0.1:9053
# optional: MAINNET or TESTNET
NETWORK: MAINNET
# optional: redis host address
REDIS_HOST: redis
# optional: redis host port
REDIS_PORT: 6379
# optional: maximum query depth
MAX_QUERY_DEPTH: 5
env_file:
# Defines DB_USER_PWD
- ./db/db.secret
links:
- "db"
- "redis"
ports:
- 3001:3000
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"