-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (153 loc) · 4.31 KB
/
docker-compose.yml
File metadata and controls
161 lines (153 loc) · 4.31 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
version: "1.1"
volumes:
ipc: {}
node-data: {}
db-sync-data: {}
postgres-data: {}
ogmios-data: {}
kupo-data: {}
# dozzle-data: {}
services:
cardano-node:
image: ghcr.io/intersectmbo/cardano-node:10.1.2
network_mode: "host"
environment:
- NETWORK=${NETWORK}
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
volumes:
- ipc:/ipc
- node-data:/data
- ./$NODE_TYPE/:/host
restart: on-failure
healthcheck:
# Ping the EKG port to see if it responds.
# Assuming if EKG isn't up then the rest of cardano-node isn't either.
test: ["CMD-SHELL", "curl -f 127.0.0.1:12788 || exit 1"]
interval: 60s
timeout: 10s
retries: 5
depends_on:
# Depend on the dozzle log monitor being active
dozzle:
condition: service_started
postgres:
image: postgres:14.10-alpine
shm_size: 1g
environment:
- POSTGRES_LOGGING=true
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- POSTGRES_USER_FILE=/run/secrets/postgres_user
secrets:
- postgres_password
- postgres_user
- postgres_db
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- ${POSTGRES_PORT:-5432}:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: on-failure
#command: ${POSTGRES_ARGS:--c maintenance_work_mem=1GB -c max_parallel_maintenance_workers=4}
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
depends_on:
# Depend on the dozzle log monitor being active
dozzle:
condition: service_started
db-sync:
image: ghcr.io/intersectmbo/cardano-db-sync:latest
environment:
- NETWORK=${NETWORK}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
- RESTORE_RECREATE_DB=N
- DB_SYNC_CONFIG=/config/config.json
- EXTRA_DB_SYNC_ARGS=${EXTRA_DB_SYNC_ARGS:-}
- DISABLE_LEDGER=${DB_SYNC_DISABLE_LEDGER:-0}
depends_on:
# Depend on both services to be healthy before starting.
cardano-node:
condition: service_healthy
postgres:
condition: service_healthy
secrets:
- postgres_password
- postgres_user
- postgres_db
volumes:
- ./cardano-configurations/network/${NETWORK}/cardano-db-sync:/config
- db-sync-data:/var/lib/cexplorer
- ipc:/node-ipc
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
ogmios:
image: cardanosolutions/ogmios:latest
build:
context: .
target: ogmios
cache_from: [cardanosolutions/ogmios:latest]
restart: on-failure
platform: linux/amd64
command: [
"--host", "0.0.0.0",
"--node-socket", "/ipc/node.socket",
"--node-config", "/config/config.json"
]
environment:
- DATA_DIR=/data
depends_on:
cardano-node:
condition: service_healthy
ports:
- ${OGMIOS_PORT:-1337}:1337
user: "0:0"
volumes:
- ipc:/ipc
- ogmios-data:/data
- ./cardano-configurations/network/${NETWORK}/cardano-node:/config
- ./cardano-configurations/network/${NETWORK}/genesis:/genesis
kupo:
image: cardanosolutions/kupo:v2.9.0
# container_name: partnerchains-kupo
command: '--host 0.0.0.0 --node-config /config/config.json --node-socket /ipc/node.socket --workdir /data/db --match "*" --since origin'
ports:
- ${KUPO_PORT:-1442}:1442
volumes:
- ipc:/ipc
- kupo-data:/data
- ./cardano-configurations/network/${NETWORK}/cardano-node:/config
- ./cardano-configurations/network/${NETWORK}/genesis:/genesis
depends_on:
cardano-node:
condition: service_healthy
restart: on-failure
dozzle:
image: amir20/dozzle:latest
volumes:
# - dozzle-data:/data
# - type: bind
# source: $HOST/var/run/docker.sock
# target: /var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock
ports:
- ${DOZZLE_PORT:-8080}:8080
secrets:
postgres_db:
file: ./secrets/postgres_db
postgres_password:
file: ./secrets/postgres_password
postgres_user:
file: ./secrets/postgres_user