-
Notifications
You must be signed in to change notification settings - Fork 162
/
docker-compose.example.yml
98 lines (93 loc) · 2.42 KB
/
docker-compose.example.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
# Not recommended for production use, and should only be used for local development!
# This is only a template, feel free to tweak this to fit your needs.
name: cardano-db-sync
services:
postgres:
image: postgres:14.10-alpine
environment:
- POSTGRES_LOGGING=true
- POSTGRES_DB=cexplorer
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=v8hlDV0yMAHHlIurYupj
networks:
- postgres
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
restart: on-failure
healthcheck:
# Use pg_isready to check postgres is running. Substitute different
# user `postgres` if you've setup differently to config/pgpass-mainnet
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
command:
- -c
- maintenance_work_mem=1GB
- -c
- max_parallel_maintenance_workers=4
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-node:
image: ghcr.io/intersectmbo/cardano-node:9.0.0
environment:
- NETWORK=${NETWORK:-mainnet}
networks:
- cardano-node
volumes:
- node-db:/data/db
- node-ipc:/ipc
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
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-db-sync:
image: ghcr.io/intersectmbo/cardano-db-sync:13.3.0.0
environment:
- NETWORK=${NETWORK:-mainnet}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=cexplorer
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=v8hlDV0yMAHHlIurYupj
depends_on:
# Depend on both services to be healthy before starting.
cardano-node:
condition: service_healthy
postgres:
condition: service_healthy
networks:
- cardano-node
- postgres
volumes:
- db-sync-data:/var/lib/cexplorer
- node-ipc:/node-ipc
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
volumes:
db-sync-data:
postgres:
node-db:
node-ipc:
networks:
cardano-node: {}
postgres: {}