-
Notifications
You must be signed in to change notification settings - Fork 104
/
docker-compose.yml
193 lines (184 loc) · 5.2 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
version: "3.8"
services:
postgres:
image: postgres:${POSTGRES_VERSION:-14.10-alpine}
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
ports:
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}
command: -p ${POSTGRES_PORT:-5432}
secrets:
- postgres_db
- postgres_password
- postgres_user
shm_size: '2gb'
volumes:
- postgres14-data:/var/lib/postgresql/data
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-node:
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-9.1.0}
environment:
- NETWORK=${NETWORK:-mainnet}
volumes:
- node-ipc:/ipc
- node-db:/node/db
- ./config/network/${NETWORK:-mainnet}:/config
entrypoint: cardano-node run --database-path /node/db --socket-path /ipc/node.socket --topology /config/cardano-node/topology.json --config /config/cardano-node/config.json
ogmios:
image: cardanosolutions/ogmios:${OGMIOS_VERSION:-v6.5.0}
command:
- --host
- 0.0.0.0
- --node-socket
- /ipc/node.socket
- --node-config
- /config/cardano-node/config.json
- --log-level-websocket
- error
volumes:
- node-ipc:/ipc
- ./config/network/${NETWORK:-mainnet}:/config
ports:
- ${OGMIOS_PORT:-1337}:1337
restart: on-failure
cardano-db-sync:
platform: linux/x86_64
image: ghcr.io/intersectmbo/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.4.0.0}
command: [
"--config", "/config/cardano-db-sync/config.json",
"--socket-path", "/node-ipc/node.socket"
]
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
- RESTORE_RECREATE_DB=N
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:
- ./config/network/${NETWORK:-mainnet}:/config
- db-sync-data:/var/lib/cexplorer
- node-ipc:/node-ipc
restart: on-failure
stop_signal: SIGINT
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
hasura:
build:
context: ./packages/api-cardano-db-hasura/hasura
image: cardanofoundation/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-8.2.1}
ports:
- ${HASURA_PORT:-8090}:8080
depends_on:
- "postgres"
restart: on-failure
environment:
- HASURA_GRAPHQL_ENABLE_CONSOLE=true
- HASURA_GRAPHQL_CORS_DOMAIN=http://localhost:9695
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
secrets:
- postgres_db
- postgres_password
- postgres_user
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
background:
build:
context: .
target: background
image: cardanofoundation/cardano-graphql-background:${CARDANO_GRAPHQL_VERSION:-8.2.1}-${NETWORK:-mainnet}
depends_on:
- "hasura"
- "postgres"
environment:
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info}
- METADATA_SERVER_URI=${METADATA_SERVER_URI:-http://token-metadata-registry:${TOKEN_REGISTRY_PORT:-8080}}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- CHAIN_FOLLOWER_START_SLOT=${CHAIN_FOLLOWER_START_SLOT:-0}
- CHAIN_FOLLOWER_START_ID=${CHAIN_FOLLOWER_START_ID:-}
restart: on-failure
secrets:
- postgres_db
- postgres_password
- postgres_user
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
server:
platform: linux/x86_64
build:
args:
- NETWORK=${NETWORK:-mainnet}
context: .
target: server
image: cardanofoundation/cardano-graphql-server:${CARDANO_GRAPHQL_VERSION:-8.2.1}-${NETWORK:-mainnet}
environment:
- ALLOW_INTROSPECTION=true
- CACHE_ENABLED=true
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
expose:
- ${API_PORT:-3100}
ports:
- ${API_PORT:-3100}:3100
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
token-metadata-registry:
build:
context: .
target: token-registry
ports:
- ${TOKEN_REGISTRY_PORT:-8080}:8080
environment:
- TOKEN_METADATA_SYNC_JOB=true
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_HOST=postgres
- DB_SCHEMA=tokenregistry
- NETWORK=${NETWORK:-mainnet}
secrets:
- postgres_db
- postgres_password
- postgres_user
restart: on-failure
depends_on:
- postgres
secrets:
postgres_db:
file: ./placeholder-secrets/postgres_db
postgres_password:
file: ./placeholder-secrets/postgres_password
postgres_user:
file: ./placeholder-secrets/postgres_user
volumes:
db-sync-data:
node-db:
node-ipc:
postgres14-data: