This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
66 lines (63 loc) · 1.81 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
version: "3.3"
services:
database:
image: mariadb:10.3
restart: always
# disable these ports in production
ports:
- "3306:3306"
# Enable this, to store the database outside the container (in production)
#volumes:
# - ./tmp/database:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=superSecr3t
- MYSQL_DATABASE=snake
- MYSQL_USER=snake
- MYSQL_PASSWORD=snake
gameserver:
image: gpn-snake:gameserver-1.0.0
# disable these ports in production
ports:
- "9010:9010"
command: /bin/bash -c "cd /build && ./GameServer"
depends_on:
- database
environment:
- MYSQL_HOST=database
- MYSQL_DB=snake
- MYSQL_USER=snake
- MYSQL_PASSWORD=snake
relayserver:
image: gpn-snake:relayserver-1.0.0
# disable these ports in production
ports:
- "9009:9009"
depends_on:
- gameserver
command: /bin/bash -c "export GAMESERVER_HOST=gameserver && cd /build && relayserver/RelayServer"
website:
image: gpn-snake:website-1.0.0
ports:
- "8000:8000"
command: /bin/sh -c "cd /code/ &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
gunicorn -b 0.0.0.0:8000 Programmierspiel.wsgi"
depends_on:
- database
volumes:
- ./tmp/static:/static
proxy:
command: /bin/bash -c "cat /etc/nginx/conf.d/nginx_conf.template > /etc/nginx/conf.d/default.conf &&
nginx -g 'daemon off;'"
depends_on:
- gameserver
- relayserver
- website
image: nginx:1.13
ports:
- "80:80"
volumes:
- ./proxy/nginx_conf.template:/etc/nginx/conf.d/nginx_conf.template
#- ./vis/code:/vis
- ./tmp/static:/static