-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yaml
159 lines (152 loc) · 4.46 KB
/
docker-compose.yaml
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
services:
exporter:
build: .
image: cosmostation/cvms:latest
container_name: cvms-exporter
restart: unless-stopped
ports: ['${EXPORTER_PORT:-9200}:9200']
entrypoint: [/bin/cvms]
command:
[
start,
exporter,
--config=/var/lib/cvms/config.yaml,
--log-color-disable,
'${LOG_COLOR_DISABLE:-false}',
--log-level,
'${LOG_LEVEL:-4}',
--port=9200,
]
volumes:
- ${CONFIG_PATH:-./config.yaml}:/var/lib/cvms/config.yaml:ro
- ./docker/cvms/support_chains.yaml:/var/lib/cvms/docker/cvms/support_chains.yaml:ro
- ./docker/cvms/custom_chains.yaml:/var/lib/cvms/docker/cvms/custom_chains.yaml:ro
networks:
- cvms-net
prometheus:
image: prom/prometheus:latest
container_name: cvms-exporter-db
extra_hosts:
- host.docker.internal:host-gateway
ports:
- ${PROM_SERVER_PORT:-9090}:9090
volumes:
- ./docker/prometheus:/etc/prometheus:ro
- exporter-db-volume:/prometheus:rw
command:
- --config.file=/etc/prometheus/${PROM_CONFIG_FILE:-prometheus.yaml}
- --web.enable-lifecycle
- --web.console.libraries=/etc/prometheus/console_libraries
- --web.console.templates=/etc/prometheus/consoles
- --storage.tsdb.retention.time=${PROM_RETENTION_TIME:-1w}
networks:
- cvms-net
restart: unless-stopped
depends_on:
- exporter
indexer:
build: .
image: cosmostation/cvms:latest
container_name: cvms-indexer
restart: unless-stopped
ports: ['${INDEXER_PORT:-9300}:9300']
entrypoint: [/bin/cvms]
command:
[
start,
indexer,
--config=/var/lib/cvms/config.yaml,
--log-color-disable,
'${LOG_COLOR_DISABLE:-false}',
--log-level,
'${LOG_LEVEL:-4}',
--port=9300,
]
environment:
- DB_HOST=cvms-indexer-db
- DB_PORT=5432
- DB_NAME=cvms
- DB_USER=${DB_USER:-cvms}
- DB_PASSWORD=${DB_PASSWORD:-mysecretpassword}
- DB_RETENTION_PERIOD=${DB_RETENTION_PERIOD:-1h}
volumes:
- ${CONFIG_PATH:-./config.yaml}:/var/lib/cvms/config.yaml:ro
- ./docker/cvms/support_chains.yaml:/var/lib/cvms/docker/cvms/support_chains.yaml:ro
- ./docker/cvms/custom_chains.yaml:/var/lib/cvms/docker/cvms/custom_chains.yaml:ro
networks:
- cvms-net
depends_on:
- postgres
postgres:
image: postgres:16.4
container_name: cvms-indexer-db
restart: unless-stopped
environment:
POSTGRES_DB: cvms
POSTGRES_USER: ${DB_USER:-cvms}
POSTGRES_PASSWORD: ${DB_PASSWORD:-mysecretpassword}
ports:
- 5432:5432
networks:
- cvms-net
volumes:
- ./docker/postgres/schema:/docker-entrypoint-initdb.d/:ro
- indexer-db-volume:/var/lib/postgresql/data
grafana:
image: grafana/grafana:latest
container_name: cvms-grafana
restart: unless-stopped
volumes:
- grafana-volume:/var/lib/grafana:rw
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
- ./docker/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
environment:
# management
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=${GRAFANA_HOME_DASHBOARD}
- GF_USERS_DEFAULT_THEME=dark
- GF_LOG_MODE=console
- GF_LOG_LEVEL=critical
# public access
- GF_AUTH_ANONYMOUS_ENABLED=true
# applications
- DB_HOST=cvms-indexer-db
- DB_PORT=5432
- DB_NAME=cvms
- DB_USER=${DB_USER:-cvms}
- DB_PASSWORD=${DB_PASSWORD:-mysecretpassword}
- GF_INSTALL_PLUGINS=nline-plotlyjs-panel
ports:
- ${GRAFANA_SERVER_PORT:-3000}:3000
# depends_on: [prometheus or postgres]
networks:
- cvms-net
alertmanager:
image: prom/alertmanager:latest
container_name: cvms-alertmanager
restart: unless-stopped
volumes:
- ./docker/alertmanager:/etc/alertmanager:ro
- alertmanager-volume:/alertmanager:rw
command:
- --config.file=/etc/alertmanager/alertmanager.yaml
networks:
- cvms-net
depends_on:
- prometheus
ports:
- ${ALERTMANAGER_SERVER_PORT:-9093}:9093
networks:
cvms-net:
name: cvms-net
driver: bridge
volumes:
grafana-volume:
name: grafana-volume
alertmanager-volume:
name: alertmanager-volume
exporter-db-volume:
name: exporter-db-volume
indexer-db-volume:
name: indexer-db-volume