-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
208 lines (196 loc) · 4.83 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
# NOTE: Works best if flextesa and ipfs are in hosts file,
# pointed to 0.0.0.0, because the bcd ui them verbatim.
version: "3.6"
services:
#elastic:
# image: ghcr.io/baking-bad/bcdhub-elastic:${TAG}
# restart: always
# volumes:
# - esdata:/usr/share/elasticsearch/data
# environment:
# - bootstrap.memory_lock=true
# - discovery.type=single-node
# - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
# logging: &bcd-logging
# options:
# max-size: 10m
# max-file: "5"
db:
image: postgres:14
shm_size: 1g
restart: always
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=indexer
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- 5432:5432
volumes:
- db:/var/lib/postgresql/data
logging: &bcd-logging
options:
max-size: 10m
max-file: "5"
api:
restart: always
image: ghcr.io/baking-bad/bcdhub-api:${TAG}
environment:
- BCD_ENV=sandbox
- GIN_MODE=debug
- DB_HOSTNAME=db
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=indexer
- SANDBOX_NODE_URI=http://flextesa:20000
- SANDBOX_IPFS_GATEWAY=http://ipfs:8080
depends_on:
#- elastic
- db
ports:
- 14000:14000
expose:
- 14000/tcp
volumes:
- bcdshare:/etc/bcd
logging: *bcd-logging
indexer:
restart: always
image: ghcr.io/baking-bad/bcdhub-indexer:${TAG}
environment:
- BCD_ENV=sandbox
- DB_HOSTNAME=db
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=indexer
- SANDBOX_NODE_URI=http://flextesa:20000
- SANDBOX_IPFS_GATEWAY=http://ipfs:8080
depends_on:
- db
#- metrics
volumes:
- bcdshare:/etc/bcd
logging: *bcd-logging
#metrics:
# restart: always
# image: ghcr.io/baking-bad/bcdhub-metrics:${TAG}
# environment:
# - BCD_ENV=sandbox
# - DB_HOSTNAME=db
# - POSTGRES_USER=root
# - POSTGRES_PASSWORD=root
# - POSTGRES_DB=indexer
# - SANDBOX_NODE_URI=http://flextesa:20000
# - SANDBOX_IPFS_GATEWAY=http://ipfs:8080
# depends_on:
# - elastic
# - db
# volumes:
# - bcdshare:/etc/bcd
# logging: *bcd-logging
gui:
container_name: sandbox-gui
restart: always
image: ghcr.io/baking-bad/bcdhub-gui:${TAG}
depends_on:
- api
ports:
- 127.0.0.1:8000:80
logging: *bcd-logging
#
# Flextesa
#
flextesa:
restart: always
image: oxheadalpha/flextesa:${SANDBOX_VERSION}
command: ${SANDBOX_TYPE} start
environment:
- block_time=${SANDBOX_BLOCKTIME}
- flextesa_node_cors_origin=*
ports:
- "20000:20000"
expose:
- 20000/tcp
logging: &flextesa-logging
options:
max-size: 10m
max-file: "5"
#
# IPFS
#
ipfs:
container_name: ipfs-node
restart: always
image: ipfs/kubo:v0.15.0
environment:
- IPFS_PATH=/ipfsdata
#- GOLOG_LOG_LEVEL=info # debug
volumes:
- ./ipfsdata:/ipfsdata
- ./docker-scripts/001-ipfs-init.sh:/container-init.d/001-ipfs-init.sh
ports:
- "4001:4001"
- "4001:4001/udp"
- "5001:5001"
- "8080:8080"
- "8081:8081"
logging: &ipfs-logging
options:
max-size: 10m
max-file: "5"
command: ["daemon", "--migrate=true", "--agent-version-suffix=docker", "--enable-gc"]
#
# tzkt api
#
db-tzkt:
container_name: db-tzkt
restart: always
image: postgres:14
environment:
POSTGRES_USER: ${POSTGRES_USER:-tzkt}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qwerty}
POSTGRES_DB: ${POSTGRES_DB:-tzkt_db}
PGPORT: 15432
volumes:
- db-tzkt:/var/lib/postgresql/data
expose:
- 15432
ports:
- 15432:15432
logging: &tzkt-logging
options:
max-size: 10m
max-file: "5"
api-tzkt:
container_name: api-tzkt
restart: always
image: bakingbad/tzkt-api:${TZKT_VERSION}
depends_on:
- db-tzkt
- flextesa
environment:
Kestrel__Endpoints__Http__Url: http://0.0.0.0:5000
ConnectionStrings__DefaultConnection: host=db-tzkt;port=15432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
expose:
- 5000
ports:
- 0.0.0.0:5020:5000
logging: *tzkt-logging
sync-tzkt:
container_name: sync-tzkt
restart: always
image: bakingbad/tzkt-sync:${TZKT_VERSION}
environment:
TezosNode__Endpoint: http://flextesa:20000
ConnectionStrings__DefaultConnection: host=db-tzkt;port=15432;database=${POSTGRES_DB:-tzkt_db};username=${POSTGRES_USER:-tzkt};password=${POSTGRES_PASSWORD:-qwerty};
depends_on:
- db-tzkt
- flextesa
logging: *tzkt-logging
volumes:
esdata:
bcdshare:
db:
driver: local
db-tzkt:
driver: local