Add snowflake configuration to wand (#34)

* Change url of wns server

* Add snowflake submodule

* Add snowflake docker deployment

* Update submodule

* Update submodule

* Refactor snowflake compose

* Fast-forward snowflake submodule

* Add snowflake configuration to `.env`

* Set force start for regular game to `False`

* Add host & port configuration

* Add wns url for language-specific sites

* Add snowflake to submodule sync

* Add snowflake configuration to install script
This commit is contained in:
Levi 2024-06-07 10:16:17 +02:00 committed by GitHub
parent 3f97b8a692
commit c9b8de1ee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 97 additions and 7 deletions

47
.env
View File

@ -113,3 +113,50 @@ WEB_SENDGRID_KEY=
GAME_ADDRESS=127.0.0.1 GAME_ADDRESS=127.0.0.1
GAME_LOGIN_PORT=6112 GAME_LOGIN_PORT=6112
##############################################
# Snowflake (Card-Jitsu Snow)
##############################################
#
# SNOWFLAKE_HOST
# --------------
# This is similar to the GAME_ADDRESS but for
# the Card-Jitsu Snow game server.
#
# SNOWFLAKE_PORT
# --------------
# The port where the Card-Jitsu Snow server
# is running. Usually fine to leave this as
# default.
#
# APPLY_WINDOWMANAGER_OFFSET
# --------------------------
# If you have issues with the game being in a
# wierd position, try setting this to True.
#
# ALLOW_FORCESTART_SNOW
# ---------------------
# Allows players to force-start a regular
# match.
#
# ALLOW_FORCESTART_TUSK
# ---------------------
# Allows players to force-start a tusk
# battle.
#
# MATCHMAKING_TIMEOUT
# -------------------
# The amount of time in seconds for a
# force-start to happen
#
##############################################
SNOWFLAKE_HOST=127.0.0.1
SNOWFLAKE_PORT=7002
APPLY_WINDOWMANAGER_OFFSET=False
ALLOW_FORCESTART_SNOW=False
ALLOW_FORCESTART_TUSK=True
MATCHMAKING_TIMEOUT=30

View File

@ -25,6 +25,7 @@ jobs:
git update-index --cacheinfo 160000,$(git ls-remote https://git.solero.me/solero/legacy-media.git/ HEAD | awk '{ print $1}'),legacy-media git update-index --cacheinfo 160000,$(git ls-remote https://git.solero.me/solero/legacy-media.git/ HEAD | awk '{ print $1}'),legacy-media
git update-index --cacheinfo 160000,$(git ls-remote https://github.com/solero/houdini.git/ HEAD | awk '{ print $1}'),houdini git update-index --cacheinfo 160000,$(git ls-remote https://github.com/solero/houdini.git/ HEAD | awk '{ print $1}'),houdini
git update-index --cacheinfo 160000,$(git ls-remote https://github.com/solero/dash.git/ HEAD | awk '{ print $1}'),dash git update-index --cacheinfo 160000,$(git ls-remote https://github.com/solero/dash.git/ HEAD | awk '{ print $1}'),dash
git update-index --cacheinfo 160000,$(git ls-remote https://github.com/lekuruu/snowflake.git/ HEAD | awk '{ print $1}'),snowflake
- name: Commit update - name: Commit update
run: | run: |

5
.gitmodules vendored
View File

@ -9,4 +9,7 @@
url = https://git.solero.me/solero/legacy-media url = https://git.solero.me/solero/legacy-media
[submodule "vanilla-media"] [submodule "vanilla-media"]
path = vanilla-media path = vanilla-media
url = https://git.solero.me/solero/vanilla-media url = https://git.solero.me/solero/vanilla-media
[submodule "snowflake"]
path = snowflake
url = https://github.com/Lekuruu/snowflake.git

View File

@ -204,6 +204,32 @@ services:
"-template", "/usr/src/dash/config.py.template:/usr/src/dash/config.py", "-template", "/usr/src/dash/config.py.template:/usr/src/dash/config.py",
"python", "bootstrap.py"] "python", "bootstrap.py"]
command: ["-c", "config.py"] command: ["-c", "config.py"]
snowflake:
build: ./snowflake
restart: always
networks:
- wand
ports:
- ${SNOWFLAKE_HOST}:${SNOWFLAKE_PORT}:${SNOWFLAKE_PORT}
env_file:
- .env
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
- MEDIA_LOCATION=${WEB_VANILLA_MEDIA}
- PORT=${SNOWFLAKE_PORT}
volumes:
- ./snowflake:/usr/src/snowflake
- ./.env:/usr/src/snowflake/.env
depends_on:
- db
- redis
- dash
links:
- db:db
- redis:redis
- houdini_login:login
entrypoint: ["dockerize", "-wait", "tcp://login:${GAME_LOGIN_PORT}", "python", "./main.py"]
networks: networks:
wand: wand:

View File

@ -59,9 +59,10 @@ git clone --recurse-submodules https://github.com/solero/wand && cd wand
echo "Done Downloading the game files." echo "Done Downloading the game files."
sudo rm -r .env sudo rm -r .env
echo "# database echo "# Database
POSTGRES_USER=postgres POSTGRES_USER=postgres
POSTGRES_PASSWORD=$dbpass POSTGRES_PASSWORD=$dbpass
# Web # Web
WEB_PORT=80 WEB_PORT=80
WEB_HOSTNAME=$hostname WEB_HOSTNAME=$hostname
@ -79,7 +80,18 @@ WEB_SENDGRID_KEY=
# Game # Game
GAME_ADDRESS=$ipadd GAME_ADDRESS=$ipadd
GAME_LOGIN_PORT=6112" > .env GAME_LOGIN_PORT=6112
# Snowflake
SNOWFLAKE_HOST=$ipadd
SNOWFLAKE_PORT=7002
APPLY_WINDOWMANAGER_OFFSET=False
ALLOW_FORCESTART_SNOW=False
ALLOW_FORCESTART_TUSK=True
MATCHMAKING_TIMEOUT=30" > .env
echo "Done!" echo "Done!"

1
snowflake Submodule

@ -0,0 +1 @@
Subproject commit 648a6184e41311c49dfc66bbdba0e87c38efcf6e

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long