-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
168 lines (149 loc) · 3.47 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
version: '3'
services:
postgres_korek:
build: ./database
environment:
- POSTGRES_DB=korek_db
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: 'bitnami/redis:5.0-debian-9'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
volumes:
- redis_data:/bitnami/redis/data
command: /run.sh --maxmemory 500mb
web_socket:
restart: always
build: ./django-notifier
environment:
- DEBUG=True
links:
- postgres_korek
- redis
depends_on:
- postgres_korek
- redis
- web_rest
ports:
- "8000:8000"
postgres_interface:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_PASSWORD=postgres
links:
- postgres_korek:postgres
ports:
- "5050:80"
web_rest:
restart: always
build: ./django-rest-swagger
environment:
- DEBUG=True
# PUBLIC PRIVATE PRIVATE-VALIDATION
- PRIVACY_MODE=PRIVATE-VALIDATION
- EMAIL_HOST=smtp.gmail.com
- EMAIL_HOST_PASSWORD=changeme
links:
- postgres_korek
depends_on:
- postgres_korek
volumes:
- media:/code/myapp/app/media/
nginx:
build: ./nginx
depends_on:
- web_socket
volumes:
- media:/media/:ro
- ssl_cetificate:/etc/letsencrypt/
ports:
- "80:80"
- "443:443"
# Logs Monitoring
logs:
build: ./monitoring/logs
privileged: true
depends_on:
- nginx
- influxdb
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
influxdb:
image: influxdb:1.7
ports:
- "8083:8083"
- "8086:8086"
- "25826:25826/udp"
volumes:
- influxdata:/var/lib/influxdb
- ./monitoring/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
- ./monitoring/influxdb/types.db:/usr/share/collectd/types.db:ro
# Metrics Monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
depends_on:
- cadvisor
- nginx-exporter
- node-exporter
links:
- cadvisor:cadvisor
- node-exporter:node-exporter
- nginx-exporter:nginx-exporter
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
nginx-exporter:
image: nginx/nginx-prometheus-exporter:0.4.0
container_name: nginx-exporter
depends_on:
- nginx
environment:
- SCRAPE_URI=http://nginx/nginx_status?auto
cadvisor:
image: gcr.io/cadvisor/cadvisor
container_name: cadvisor
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- nginx
# Display Logs & Metrics
grafana:
image: grafana/grafana:5.3.2
depends_on:
- prometheus
- postgres_korek
- cadvisor
links:
- postgres_korek:postgres
ports:
- "3000:3000"
volumes:
- ./monitoring/grafana/:/var/lib/grafana/
user: $USER
volumes:
pgdata: {}
influxdata: {}
redis_data: {}
serverlog: {}
media: {}
ssl_cetificate: {}