-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
291 lines (271 loc) · 7.05 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
version: "2"
volumes:
prometheus_data: {}
grafana_data: {}
l4d2:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '${THIS_DIR}/game-servers/l4d2'
services:
nginx:
restart: always
# build: ./nginx/
# image: nginx:1.13
image: jwilder/nginx-proxy
container_name: nginx
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
# - ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/passwords:/etc/nginx/htpasswd
ports:
- 80:80
networks:
- nginx_network
django:
restart: always
build: ./site/
container_name: django
env_file: ./site/environment.env
stdin_open: true
tty: true
environment:
- VIRTUAL_HOST=${WEB_DOMAIN}
- VIRTUAL_PORT=8000
volumes:
- ./site/:/opt/services/thiccsite/src
depends_on:
- mysql-site
- nginx
networks:
- nginx_network
- mysql_network
- redis_network
command: gunicorn -b :8000 --reload thicc.wsgi:application
celery:
restart: always
container_name: celery
build: ./site
env_file: ./site/environment.env
volumes:
- ./site/:/opt/services/thiccsite/src
depends_on:
- mysql-site
- redis
networks:
- mysql_network
- redis_network
command: celery -E -A thicc.celery_tasks worker -B --loglevel=debug
#flower:
# restart: always
# container_name: flower
# build: ./site
# env_file: ./site/environment.env
# ports:
# - 5555:5555
# volumes:
# - ./site/:/opt/services/thiccsite/src
# environment:
# - VIRTUAL_HOST=${FLOWER_SUBDOMAIN}.${WEB_DOMAIN}
# - VIRTUAL_PORT=5555
# depends_on:
# - nginx
# - mysql-site
# - redis
# networks:
# - nginx_network
# - mysql_network
# - redis_network
# command: celery flower -A thicc.celery_tasks --loglevel=info --persistent=True --broker_api=redis://redis:6379/0
redis:
restart: always
container_name: redis
image: "redis:latest"
# volumes:
#- ./redis/redis.conf:/var/lib/redis/redis.conf
# image: "deadtrickster/redis_prometheus"
networks:
- redis_network
#redis-exporter:
# restart: always
# container_name: redis-exporter
# environment:
# - REDIS_ADDR=redis://redis:6379
# image:
# "oliver006/redis_exporter"
# networks:
# - prometheus_network
# - redis_network
#redis:
# restart: always
# container_name: redis
# env_file: ./redis/environment.env
# environment:
# - VIRTUAL_HOST=redis.localhost
# - VIRTUAL_PORT=15672
# image: "redis:3-management"
# volumes:
# - ./redis/redis.conf:/var/lib/redis/redis.conf
# # image: "deadtrickster/redis_prometheus"
# networks:
# - redis_network
mysql-site:
restart: always
container_name: mysql-site
image: mysql:5.7.19
volumes:
- /opt/services/sitedb/:/var/lib/mysql
env_file:
- ./mysql/thiccsite/environment.env
networks:
- mysql_network
l4d2:
build: ./game-servers/l4d2_build
container_name: l4d2
depends_on:
- mysql-site
volumes:
#- ./game-servers/l4d2/addons:/opt/l4d2/left4dead2/addons
#- ./game-servers/l4d2/cfg:/opt/l4d2/left4dead2/cfg
#- ./game-servers/l4d2/steam_appid.txt:/opt/l4d2/steam_appid.txt
#- ./game-servers/l4d2/host.txt:/opt/l4d2/left4dead2/host.txt
#- ./game-servers/l4d2/motd.txt:/opt/l4d2/left4dead2/motd.txt
- l4d2:/opt/l4d2/
restart: always
ports:
- "27000-27050:27000-27050/udp"
- "27000-27050:27000-27050"
networks:
- mysql_network
command: /opt/l4d2/srcds_run -game left4dead2 -debug -secure -console +map c8m1_apartment -tickrate 100 -usercon -ip 0.0.0.0 +sv_gametypes versus +mp_gamemode versus
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
env_file: ./phpmyadmin/environment.env
restart: always
links:
- "mysql-site:mysql-site"
volumes:
- /sessions
environment:
- VIRTUAL_HOST=${MYADMIN_SUBDOMAIN}.${WEB_DOMAIN}
- VIRTUAL_PORT=80
depends_on:
- nginx
- mysql-site
networks:
- nginx_network
- mysql_network
#prometheus:
# image: prom/prometheus:latest
# container_name: prometheus
# volumes:
# - ./prometheus/:/etc/prometheus/
# - prometheus_data:/prometheus
# environment:
# - VIRTUAL_HOST=${PROMETHEUS_SUBDOMAIN}.${WEB_DOMAIN}
# - VIRTUAL_PORT=8080
# command:
# # Use the prometheus.yml located in ./prometheus
# - '--config.file=/etc/prometheus/prometheus.yml'
# - '--storage.tsdb.path=/prometheus'
# - '--web.console.libraries=/usr/share/prometheus/console_libraries'
# - '--web.console.templates=/usr/share/prometheus/consoles'
# - '--log.level=debug'
# depends_on:
# - node-exporter
# - alertmanager
# - cadvisor
# - nginx
# - redis-exporter
# - mysql-exporter
# networks:
# - nginx_network
# - prometheus_network
# restart: always
#mysql-exporter:
# image: prom/mysqld-exporter
# container_name: mysql-exporter
# env_file: ./mysqld-exporter/environment.env
# depends_on:
# - nginx
# - mysql-site
# networks:
# - nginx_network
# - mysql_network
# - prometheus_network
# restart: always
#node-exporter:
# image: prom/node-exporter
# container_name: node-exporter
# cap_add:
# - SYS_TIME
# volumes:
# - /proc:/host/proc:ro
# - /sys:/host/sys:ro
# - /:/rootfs:ro
# command:
# - '--path.procfs=/host/proc'
# - '--path.sysfs=/host/sys'
# - --collector.filesystem.ignored-mount-points
# - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
# networks:
# - prometheus_network
# restart: always
#alertmanager:
# image: prom/alertmanager
# container_name: alertmanager
# volumes:
# - ./alertmanager/:/etc/alertmanager/
# environment:
# - VIRTUAL_HOST=${ALERTMANAGER_SUBDOMAIN}.${WEB_DOMAIN}
# - VIRTUAL_PORT=9093
# networks:
# - prometheus_network
# - nginx_network
# restart: always
# command:
# - '--config.file=/etc/alertmanager/config.yml'
# - '--storage.path=/alertmanager'
#cadvisor:
# image: google/cadvisor
# container_name: cadvisor
# volumes:
# - /:/rootfs:ro
# - /var/run:/var/run:rw
# - /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
# networks:
# - prometheus_network
# restart: always
#grafana:
# image: grafana/grafana
# container_name: grafana
# user: "1000"
# environment:
# - VIRTUAL_HOST=${GRAFANA_SUBDOMAIN}.${WEB_DOMAIN}
# - VIRTUAL_PORT=3000
# volumes:
# - grafana_data:/var/lib/grafana
# - ./grafana/provisioning/:/etc/grafana/provisioning/
# env_file:
# - ./grafana/config.monitoring
# depends_on:
# - nginx
# - prometheus
# networks:
# - nginx_network
# - prometheus_network
# restart: always
networks:
nginx_network:
driver: bridge
mysql_network:
driver: bridge
# mysql2_network:
# driver: bridge
redis_network:
driver: bridge
prometheus_network:
driver: bridge