-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
149 lines (134 loc) · 3.53 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
version: '3.4'
# 0 postgres
# 1 polkadot / substrate node
# 2 archiver
# 3 hasura
# 4 adminer ( optional )
services:
#
# P O L K A D O T
#
# archive:
# image: 2075/archiver-polkadot:latest
# container_name: archiver
# restart: unless-stopped
# command: ["-vv", "--config", "config/polkadot.toml"]
# volumes:
# - ./config:/config
# - ./data/substrate/chains/dev/db:/archive/data
# links:
# - postgres
# - polkadot
# depends_on:
# - postgres
# - polkadot
# networks:
# - backend
# polkadot:
# image: parity/polkadot:latest
# container_name: polkadot
# restart: unless-stopped
# ports:
# - 30333:30333
# - 9933:9933
# - 9944:9944
# command: ["--chain", "polkadot", "--name", "PolkadotArchiver", "--pruning", "archive"]
# volumes:
# - ./data/polkadot:/data
# networks:
# - backend
#
# S U B S T R A T E
#
archive:
image: 2075/archiver-substrate:latest
container_name: archiver
restart: unless-stopped
command: ["-vv", "--config", "${ARCHIVER_CONFIG}", "--spec", "${CHAINSPEC}"]
volumes:
- ./config:/config
- ./data/substrate/chains/dev/db:/archive/data
links:
- postgres
- substrate
depends_on:
- postgres
- substrate
networks:
- backend
substrate:
image: parity/substrate:latest
container_name: substrate
restart: unless-stopped
ports:
- 30333:30333
- 9933:9933
- 9944:9944
command: ["--chain", "${CHAINSPEC}", "--base-path", "/data", "--name", "${NODE_NAME}", "--pruning", "archive", "--alice", "--validator", "--unsafe-rpc-external", "--unsafe-ws-external", "--rpc-cors", "all"]
volumes:
- ./config:/config
- ./data/substrate:/data
networks:
- backend
postgres:
image: postgres
container_name: postgres
ports:
- '${DB_PORT}:5432'
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
volumes:
- ./data/pg:/var/lib/postgresql/data
networks:
- backend
graphql:
image: hasura/graphql-engine:v1.3.0
container_name: graphql
ports:
- '${GQL_PORT}:8080'
depends_on:
- 'postgres'
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USER}:${DB_PASS}@postgres:5432/${DB_NAME}
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
# admin secret — remove when not in dev environment
HASURA_GRAPHQL_ENABLE_CONSOLE: "${GQL_CONSOLE}"
HASURA_GRAPHQL_ADMIN_SECRET: ${GQL_SECRET}
networks:
- frontend
- backend
# db admin
# adminer:
# image: adminer
# container_name: adminer
# restart: always
# ports:
# - ${DB_ADMIN_PORT}:8080
# links:
# - postgres:postgres
# monitoring
# grafana:
# image: grafana/grafana:latest
# container_name: grafana
# volumes:
# - ./data/grafana/data:/var/lib/grafana
# - ./data/grafana/provisioning:/etc/grafana/provisioning
# environment:
# - GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
# - GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASS}
# - GF_USERS_ALLOW_SIGN_UP=false
# restart: unless-stopped
# ports:
# - ${GF_PORT}:3000
# networks:
# - backend
# - frontend
# labels:
# org.label-schema.group: "monitoring"
networks:
backend:
frontend: