Loading 2_run.sh +3 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ docker-compose -f docker-compose.yml up -d database sleep 5 docker-compose -f docker-compose.yml up docker-compose -f docker-compose.yml up -d website sleep 5 docker-compose -f docker-compose.yml up -d docker-compose.yml +20 −8 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ services: restart: always # disable these ports in production ports: - "3306:3306" - "666:3007" # Enable this, to store the database outside the container (in production) #volumes: # - ./tmp/database:/var/lib/mysql volumes: - ./tmp/database:/var/lib/mysql #networks: # schlangen: {} environment: - MYSQL_ROOT_PASSWORD=superSecr3t - MYSQL_DATABASE=snake Loading @@ -19,10 +21,12 @@ services: image: gpn-snake:gameserver-1.0.0 # disable these ports in production ports: - "9010:9010" - "7010:9010" command: /bin/bash -c "cd /build && ./GameServer" depends_on: - database #networks: # schlangen: {} environment: - MYSQL_HOST=database - MYSQL_DB=snake Loading @@ -32,14 +36,18 @@ services: image: gpn-snake:relayserver-1.0.0 # disable these ports in production ports: - "9009:9009" - "7009:9009" depends_on: - gameserver #networks: # schlangen: {} command: /bin/bash -c "export GAMESERVER_HOST=gameserver && cd /build && relayserver/RelayServer" website: image: gpn-snake:website-1.0.0 ports: - "8000:8000" #networks: # schlangen: {} command: /bin/sh -c "cd /code/ && python manage.py migrate && python manage.py collectstatic --noinput && Loading @@ -50,7 +58,7 @@ services: - ./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;'" nginx-debug -g 'daemon off;'" depends_on: - gameserver - relayserver Loading @@ -58,9 +66,13 @@ services: image: nginx:1.13 ports: - "80:80" #networks: # schlangen: {} volumes: - ./proxy/nginx_conf.template:/etc/nginx/conf.d/nginx_conf.template #- ./vis/code:/vis - ./tmp/static:/static #networks: # schlangen: # internal: true No newline at end of file proxy/nginx_conf.template +2 −0 Original line number Diff line number Diff line Loading @@ -25,4 +25,6 @@ server { location /static { alias /static/; } access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; } Loading
2_run.sh +3 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,6 @@ docker-compose -f docker-compose.yml up -d database sleep 5 docker-compose -f docker-compose.yml up docker-compose -f docker-compose.yml up -d website sleep 5 docker-compose -f docker-compose.yml up -d
docker-compose.yml +20 −8 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ services: restart: always # disable these ports in production ports: - "3306:3306" - "666:3007" # Enable this, to store the database outside the container (in production) #volumes: # - ./tmp/database:/var/lib/mysql volumes: - ./tmp/database:/var/lib/mysql #networks: # schlangen: {} environment: - MYSQL_ROOT_PASSWORD=superSecr3t - MYSQL_DATABASE=snake Loading @@ -19,10 +21,12 @@ services: image: gpn-snake:gameserver-1.0.0 # disable these ports in production ports: - "9010:9010" - "7010:9010" command: /bin/bash -c "cd /build && ./GameServer" depends_on: - database #networks: # schlangen: {} environment: - MYSQL_HOST=database - MYSQL_DB=snake Loading @@ -32,14 +36,18 @@ services: image: gpn-snake:relayserver-1.0.0 # disable these ports in production ports: - "9009:9009" - "7009:9009" depends_on: - gameserver #networks: # schlangen: {} command: /bin/bash -c "export GAMESERVER_HOST=gameserver && cd /build && relayserver/RelayServer" website: image: gpn-snake:website-1.0.0 ports: - "8000:8000" #networks: # schlangen: {} command: /bin/sh -c "cd /code/ && python manage.py migrate && python manage.py collectstatic --noinput && Loading @@ -50,7 +58,7 @@ services: - ./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;'" nginx-debug -g 'daemon off;'" depends_on: - gameserver - relayserver Loading @@ -58,9 +66,13 @@ services: image: nginx:1.13 ports: - "80:80" #networks: # schlangen: {} volumes: - ./proxy/nginx_conf.template:/etc/nginx/conf.d/nginx_conf.template #- ./vis/code:/vis - ./tmp/static:/static #networks: # schlangen: # internal: true No newline at end of file
proxy/nginx_conf.template +2 −0 Original line number Diff line number Diff line Loading @@ -25,4 +25,6 @@ server { location /static { alias /static/; } access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; }