From daf7ef38c26116880a280684997aadadd46867c6 Mon Sep 17 00:00:00 2001 From: JeffTheRock <84420756+JeffTheRock@users.noreply.github.com> Date: Sun, 27 Sep 2026 22:04:33 -0400 Subject: [PATCH] repair install script & make redis persistent (#48) * add snowflake extra features to env and fix install script * make redis persist * add default value for smtp port in env * upgrade redis version and make redis internal * add gitignore * push redis version further due to 7.9's licence --- .env | 30 ++++++- .gitignore | 2 + docker-compose.yml | 7 +- install.sh | 211 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 241 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.env b/.env index cdaae56..39ee204 100644 --- a/.env +++ b/.env @@ -136,7 +136,7 @@ EMAIL_FROM_ADDRESS=no-reply@example.com EMAIL_SENDGRID_KEY= EMAIL_SMTP_HOST= -EMAIL_SMTP_PORT= +EMAIL_SMTP_PORT=0 EMAIL_SMTP_USER= EMAIL_SMTP_PASS= EMAIL_SMTP_SSL=TRUE @@ -178,10 +178,21 @@ GAME_LOGIN_PORT=6112 # is running. Usually fine to leave this as # default. # +# MEDIA_LOCATION +# ----------------- +# The URL at which clients can access your +# Card-Jitsu Snow media server from. Should +# be the same as WEB_VANILLA_MEDIA. +# # APPLY_WINDOWMANAGER_OFFSET # -------------------------- # If you have issues with the game being in a -# wierd position, try setting this to True. +# weird position, try setting this to True. +# +# ENABLE_BETA +# -------------------------- +# If you want to enable the beta features, set +# this to True. # # ALLOW_FORCESTART_SNOW # --------------------- @@ -196,16 +207,29 @@ GAME_LOGIN_PORT=6112 # MATCHMAKING_TIMEOUT # ------------------- # The amount of time in seconds for a -# force-start to happen +# force-start to happen. +# +# ENABLE_NINJA_AI +# ------------------- +# If there aren't enough players in +# the queue when MATCHMAKING_TIMEOUT is +# reached, the remaining places will be +# filled with bots. # ############################################## SNOWFLAKE_HOST=127.0.0.1 SNOWFLAKE_PORT=7002 +MEDIA_LOCATION="http://media.localhost" + APPLY_WINDOWMANAGER_OFFSET=False +ENABLE_BETA=False + ALLOW_FORCESTART_SNOW=False ALLOW_FORCESTART_TUSK=True MATCHMAKING_TIMEOUT=30 + +ENABLE_NINJA_AI=False \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff0c3f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.data/ +/.redis/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 60a419e..817acfd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,12 +16,15 @@ services: labels: net.unraid.docker.icon: https://raw.githubusercontent.com/solero/wand/refs/heads/master/icons/db.png redis: - image: redis:5.0.9-alpine + image: redis:8.10.2-alpine restart: always + command: redis-server --save 60 1 --loglevel warning + volumes: + - ./.redis:/data networks: - wand ports: - - 6379 + - 127.0.0.1:6379:6379 labels: net.unraid.docker.icon: https://raw.githubusercontent.com/solero/wand/refs/heads/master/icons/redis.png web: diff --git a/install.sh b/install.sh index 328ffd9..429e133 100644 --- a/install.sh +++ b/install.sh @@ -134,11 +134,80 @@ git clone --recurse-submodules https://github.com/solero/wand && cd wand echo "Done Downloading the game files." sudo rm -r .env -echo "# Database +echo " +############################################## +# Database +############################################## +# +# POSTGRES_USER +# ------------- +# The name for the root database account and +# also the name for the database itself. +# +# POSTGRES_PASSWORD +# ----------------- +# The password for the postgres database. It +# is reccomended that you change this to +# something secure! +############################################## + POSTGRES_USER=postgres POSTGRES_PASSWORD=$dbpass +############################################## # Web +############################################## +# +# WEB_PORT +# -------- +# The port that the nginx container will +# listen on. It is fine to leave this so long +# as you do not have a web server running +# already. +# +# WEB_HOSTNAME +# ------------ +# The hostname you intend to serve web traffic +# through. For example `clubpenguin.com`. +# +# WEB_LEGACY_PLAY +# --------------- +# The URL at which clients can access your +# legacy play page from. Ideally this is +# accessed via a subdomain like +# `play.clubpenguin.com` but it can also be on +# your root domain with a path like +# `http://clubpenguin.com/play`. +# +# WEB_LEGACY_MEDIA +# ---------------- +# The URL at which clients can access your +# media server from. Ideally this is accessed +# via a subdomain like `media.clubpenguin.com` +# but it can also be on your root domain with +# a path like `http://clubpenguin.com/media`. +# +# WEB_VANILLA_PLAY +# ---------------- +# The URL at which clients can access your +# vanilla play page from. +# +# WEB_VANILLA_MEDIA +# ----------------- +# The URL at which clients can access your +# vanilla media server from. +# +# WEB_RECAPTCHA_SITE +# ------------------ +# Google reCAPTCHA v3 site key. +# +# Leave blank to disable reCAPTCHA. +# +# WEB_RECAPTCHA_SECRET +# -------------------- +# Google reCAPTCHA v3 secret key. +############################################## + WEB_PORT=80 WEB_HOSTNAME=$hostname @@ -151,22 +220,156 @@ WEB_VANILLA_MEDIA=http://media.$hostname WEB_RECAPTCHA_SITE= WEB_RECAPTCHA_SECRET= -WEB_SENDGRID_KEY= +############################################## +# Email +############################################## +# +# EMAIL_METHOD +# ------------ +# This is the method that will be used for +# email. It accepts the following options: +# - SENDGRID +# - SMTP +# +# Leave blank to disable activation and have +# players be activated immediately upon +# registration. +# +# EMAIL_FROM_ADDRESS +# --------------- +# The mailbox you're sending the email from. +# This is typically the same as +# EMAIL_SMTP_PASS but may be another mailbox +# that user has access to. +# +# EMAIL_SENDGRID_KEY +# --------------- +# Sendgrid API key used for player activation. +# +# EMAIL_SMTP_HOST +# --------------- +# Email SMTP server hostname or address. +# +# EMAIL_SMTP_PORT +# --------------- +# Email SMTP server port. +# +# EMAIL_SMTP_USER +# --------------- +# Email SMTP server login username. +# +# EMAIL_SMTP_PASS +# --------------- +# Email SMTP server login password. +# +# EMAIL_SMTP_SSL +# --------------- +# Set to TRUE if your SMTP server uses SSL. +############################################## +EMAIL_METHOD= +EMAIL_FROM_ADDRESS=no-reply@$hostname + +EMAIL_SENDGRID_KEY= + +EMAIL_SMTP_HOST= +EMAIL_SMTP_PORT=0 +EMAIL_SMTP_USER= +EMAIL_SMTP_PASS= +EMAIL_SMTP_SSL=TRUE + + +############################################## # Game +############################################## +# +# GAME_ADDRESS +# ------------ +# This is where clients can connect to your +# game server. If this is a localhost setup, +# it can stay default. Otherwise, it should be +# the external IP of the host machine this +# instance is running on. +# +# GAME_LOGIN_PORT +# --------------- +# The login server port. Usually fine to leave +# this. +############################################## + GAME_ADDRESS=$ipadd GAME_LOGIN_PORT=6112 -# Snowflake +############################################## +# 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. +# +# MEDIA_LOCATION +# ----------------- +# The URL at which clients can access your +# Card-Jitsu Snow media server from. Should +# be the same as WEB_VANILLA_MEDIA. +# +# APPLY_WINDOWMANAGER_OFFSET +# -------------------------- +# If you have issues with the game being in a +# weird position, try setting this to True. +# +# ENABLE_BETA +# -------------------------- +# If you want to enable the beta features, set +# 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. +# +# ENABLE_NINJA_AI +# ------------------- +# If there aren't enough players in +# the queue when MATCHMAKING_TIMEOUT is +# reached, the remaining places will be +# filled with bots. +# +############################################## + SNOWFLAKE_HOST=$ipadd SNOWFLAKE_PORT=7002 +MEDIA_LOCATION=http://media.$hostname + APPLY_WINDOWMANAGER_OFFSET=False +ENABLE_BETA=False + ALLOW_FORCESTART_SNOW=False ALLOW_FORCESTART_TUSK=True -MATCHMAKING_TIMEOUT=30" > .env +MATCHMAKING_TIMEOUT=30 + +ENABLE_NINJA_AI=False" > .env echo "Done!"