Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (93 loc) · 2.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (93 loc) · 2.11 KB
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
services:
devtasker:
build:
context: .
dockerfile: Dockerfile
container_name: devtasker
ports:
- 3000:3000
restart: unless-stopped
networks:
- monitor
env_file:
- .devtasker.env
depends_on:
- postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 10s
retries: 5
postgres:
image: postgres
container_name: postgres
ports:
- 5432:5432
restart: unless-stopped
networks:
- monitor
env_file:
- .postgres.env
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
retries: 5
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090 # host:container
restart: unless-stopped
networks:
- monitor
volumes:
- ./monitor/prometheus:/etc/prometheus
- prom_data:/prometheus
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/healthy"]
interval: 10s
retries: 5
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3001:3001
networks:
- monitor
restart: unless-stopped
env_file:
- .grafana.env
volumes:
- ./monitor/grafana:/etc/grafana/provisioning/datasources
- grafana_data:/grafana
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3001"]
interval: 10s
retries: 5
nginx:
image: nginx:alpine
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- devtasker
- prometheus
- grafana
networks:
- monitor
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://devtasker:3000/health"] # check if nginx can reach devtasker
interval: 10s
retries: 5
volumes:
db_data:
prom_data:
grafana_data:
networks:
monitor:
driver: bridge