-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
127 lines (115 loc) · 2.54 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
version: '3'
services:
postgres:
build:
context: psql
dockerfile: Dockerfile
ports:
- "5432:5432"
volumes:
- ./psql/data:/var/lib/postgresql/data
frontend:
build:
context: Backend
dockerfile: Dockerfile
ports:
- "3030:3030"
depends_on:
- postgres
- redis
command: sh -c "python manage.py runserver 0.0.0.0:3030"
backend:
build:
context: API
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
- postgres
- redis
environment:
- DATABASE_URL=postgres://postgres:123@db:5432/transcendenceDB
volumes:
- ./API/backendVol:/app/backend
command: sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
redis:
image: "redis:alpine"
nginx:
build:
context: .
dockerfile: Dockerfile
ports:
- "443:443"
depends_on:
- backend
- redis
- postgres
volumes:
- ./Nginx/nginx.conf:/etc/nginx/nginx.conf
command: nginx -g 'daemon off;'
prometheus:
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./Devops/grafana-prometheus/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./Devops/grafana-prometheus/prometheus/rules.yml:/etc/prometheus/rules.yml
restart: always
networks:
- monitoring
grafana:
image: grafana/grafana
ports:
- "3000:3000"
depends_on:
- prometheus
restart: always
networks:
- monitoring
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
ports:
- "9100:9100"
command:
- '--path.rootfs=/host'
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
networks:
- monitoring
cadvisor:
container_name: cadvisor
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "8080:8080"
volumes:
- "/:/rootfs"
- "/var/run:/var/run"
- "/sys:/sys"
- "/var/lib/docker/:/var/lib/docker"
- "/dev/disk/:/dev/disk"
privileged: true
devices:
- "/dev/kmsg"
restart: unless-stopped
networks:
- monitoring
alertmanager:
image: prom/alertmanager:v0.12.0
ports:
- 9093:9093
volumes:
- ./Devops/alertmanager/:/etc/alertmanager/
restart: always
command:
- '-config.file=/etc/alertmanager/alertmanager.yml'
- '-storage.path=/alertmanager'
deploy:
mode: global
networks:
monitoring:
driver: bridge
volumes:
alertmanager-data: