-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·136 lines (125 loc) · 3.19 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
version: "3"
networks:
monitoring:
driver: bridge
services:
postgres:
container_name: "postgres_${CONTOUR}"
image: postgres:13.3
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
env_file:
- .env
volumes:
- "${POSTGRES_INIT_SCRIPT}"
- "${POSTGRES_LOG}"
- "${PGDATA}"
- "${PG_CONF}"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
networks:
- monitoring
api:
container_name: "api_${CONTOUR}"
restart: on-failure
entrypoint: [ "/bin/sh", "/docker/api/api.sh", "Development" ]
build:
context: .
dockerfile: docker/api/Dockerfile_api
env_file:
- .env
ports:
- "127.0.0.1:${API_HOST_PORT}:${API_PORT}"
depends_on:
- postgres
networks:
- monitoring
prometheus:
container_name: "prometheus_${CONTOUR}"
image: prom/prometheus
restart: on-failure
depends_on:
- postgres
command:
- "${PROMETHEUS_CONFIG_FILE}"
- "${PROMETHEUS_STORAGE}"
- "${PROMETHEUS_WEB_CONSOLE_LIBS}"
- "${PROMETHEUS_WEB_CONSOLE_TEMPLATES}"
- "${PROMETHEUS_WEB_ADDRESS}"
- "${PROMETHEUS_STORAGE_GB}"
- "${PROMETHEUS_STORAGE_EXPIRE}"
ports:
- "${PROMETHEUS_HOST_PORT}:5556"
networks:
- monitoring
volumes:
- "${PROMETHEUS_CONF}"
- "${PROMETHEUS_DATA}"
grafana:
container_name: "grafana_${CONTOUR}"
image: grafana/grafana:7.5.7
restart: on-failure
depends_on:
- prometheus
ports:
- "${GRAFANA_HOST_PORT}:3000"
networks:
- monitoring
volumes:
- "${GRAFANA_DASHBOARDS}"
- "${GRAFANA_DATASOURCES}"
- "${GRAFANA_CONFIG}"
- "${GRAFANA_DATA_DASHBOARDS}"
node-exporter:
container_name: "node-exporter_${CONTOUR}"
image: prom/node-exporter:latest
restart: on-failure
depends_on:
- prometheus
command:
- "${NODE_EXPORTER_PROC}"
- "${NODE_EXPORTER_ROOT_FS}"
- "${NODE_EXPORTER_SYS_FS}"
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
networks:
- monitoring
volumes:
- "${NODE_EXPORTER_SYS_PROC_VOLUME}"
- "${NODE_EXPORTER_SYS_ROOT_FS_VOLUME}"
- "${NODE_EXPORTER_SYS_FS_VOLUME}"
postgres-exporter-pgserver94:
container_name: "postgres-exporter-pgserver94_${CONTOUR}"
image: wrouesnel/postgres_exporter:latest
restart: on-failure
depends_on:
- prometheus
command: "${POSTGRES_EXPORTER_QUERIES}"
networks:
- monitoring
environment:
- "DATA_SOURCE_NAME=${POSTGRES_DATA_SOURCE_NAME}"
volumes:
- "${POSTGRES_EXPORTER_QUERIES_VOLUME}"
redis:
container_name: "redis_${CONTOUR}"
image: redis
restart: on-failure
networks:
- monitoring
redis-exporter:
container_name: "redis-exporter_${CONTOUR}"
image: oliver006/redis_exporter
restart: on-failure
depends_on:
- prometheus
- redis
command: -redis.addr redis://redis:6379
ports:
- "${REDIS_HOST_PORT}:9121"
networks:
- monitoring
volumes:
elasticsearch_data:
driver: local