-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
218 lines (205 loc) · 5.27 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
209
210
211
212
213
214
215
216
217
218
version: "3.8"
services:
bostrom:
image: cyberd/bostrom:v3.0.1-cuda11.4
restart: always
container_name: bostrom
ports:
- "0.0.0.0:26090:9090"
- "0.0.0.0:26656:26656"
- "0.0.0.0:26657:26657"
- "0.0.0.0:1317:1317"
- "0.0.0.0:26660:26660"
environment:
ALLOW_SEARCH: "true"
volumes:
- $HOME/.cyber:/root/.cyber
logging:
options:
max-size: "1g"
max-file: "2"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
postgres:
image: postgres:latest
restart: always
container_name: cyberindex_postgres
environment:
- POSTGRES_DB=${POSTGRES_DB_NAME}
- POSTGRES_USER=${POSTGRES_USER_NAME}
- POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
volumes:
- $HOME/.cyberindex/postgres:/var/lib/postgresql/data
- ./database/schema/:/docker-entrypoint-initdb.d/
env_file:
- .env
ports:
- ${POSTGRES_DB_PORT}:5432
depends_on:
- ipfs
graphql-engine:
image: hasura/graphql-engine:latest
restart: always
container_name: cyberindex_hasura
environment:
- DOMAIN
env_file:
- .env
ports:
- ${HASURA_PORT}:8080
depends_on:
- postgres
cyberindex:
image: cyberd/cyberindex:v1.0.0
restart: always
container_name: cyberindex
environment:
- DOMAIN
volumes:
- ~/cybernode/.env:/app/.env
env_file:
- .env
depends_on:
- graphql-engine
ipfs:
image: ipfs/go-ipfs:latest
container_name: ipfs
restart: unless-stopped
environment:
- DOMAIN
env_file:
- .env
volumes:
- ./data/ipfs:/ipfsdata
ports:
- "4001:4001"
- "127.0.0.1:8080:8080"
- "127.0.0.1:5001:5001"
depends_on:
- bostrom
node-exporter:
image: prom/node-exporter:latest
ports:
- "127.0.0.1:9100:9100"
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
expose:
- 9100
depends_on:
- cyberindex
prometheus:
image: prom/prometheus:latest
ports:
- "0.0.0.0:9090:9090"
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
depends_on:
- node-exporter
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
ports:
- "127.0.0.1:8089:8089"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
cap_add:
- SYSLOG
devices:
- "/dev/kmsg:/dev/kmsg"
depends_on:
- prometheus
nginx:
image: nginx:latest
container_name: nginx
environment:
- DOMAIN
ports:
- "80:80"
- "443:443"
- "127.0.0.1:81:81"
volumes:
- ./volumes/nginx/cybernode.conf:/etc/nginx/conf.d/cybernode.conf
- ./volumes/certbot/www:/var/www
- ./volumes/certbot/letsencrypt:/etc/letsencrypt
depends_on:
- cadvisor
nginx-exporter:
image: nginx/nginx-prometheus-exporter:0.10.0
container_name: nginx-exporter
restart: unless-stopped
environment:
- SCRAPE_URI=http://nginx:81/status
- TELEMETRY_PATH=/metrics
ports:
- "127.0.0.1:9113:9113"
#mem_limit: 128m # for docker-compose v2 only
#mem_reservation: 64m # for docker-compose v2 only
depends_on:
- nginx
certbot:
container_name: certbot
image: certbot/certbot:latest
depends_on:
- nginx
command: certonly --cert-name cybernode --reinstall --webroot --webroot-path=/var/www/ --no-eff-email --agree-tos --email ${EMAIL} -d ${DOMAIN} -d rpc.bostrom.${DOMAIN} -d grpc.bostrom.${DOMAIN} -d lcd.bostrom.${DOMAIN} -d ipfs.${DOMAIN} -d grafana.${DOMAIN} -d index.${DOMAIN}
volumes:
- ./volumes/certbot/www/:/var/www/
- ./volumes/certbot/letsencrypt:/etc/letsencrypt:rw
logging:
driver: json-file
options:
max-size: 1m
max-file: "3"
blackbox-exporter:
image: prom/blackbox-exporter:latest
container_name: blackbox-exporter
volumes:
- ./blackbox.yml:/config/blackbox.yml
ports:
- "127.0.0.1:9115:9115"
command:
- '--config.file=/config/blackbox.yml'
restart: unless-stopped
depends_on:
- nginx-exporter
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./volumes/grafana:/var/lib/grafana
depends_on:
- prometheus
user: "0"