Server Update Steps

Revision as of 23:14, 17 April 2026 by Orth (talk | contribs) (Complete rewrite for automated CI/CD deployment flow)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

All deployments are managed through GitHub PRs, CI pipelines, and the Discord dashboard. No manual SSH builds required.

Overview

Component Repo Branch CI Trigger Deploy Method
NWN Module layonara/nwn-module ee Push to ee Dashboard → Deploy
Hak Packs layonara/nwn-haks 64bit Push to 64bit Dashboard → Deploy (requires Stop first)
NWNX (Unified) plenarius/unified master Push to master Dashboard → Update NWNX
Discord Bot discord-bot-aragen main Push to main Auto-deploy via Coolify

Module Update

  1. Create a PR targeting the ee branch on nwn-module
  2. Merge the PR — CI automatically runs stage-module.sh on leanthar, which compiles with nasher and stages the .mod file to ee64's .staged directory
  3. On the Discord dashboard, click Deploy → select the staged version from the dropdown → set wait time → confirm
  4. The bot promotes the staged module to live, updates NWN_MODULE in the environment, and triggers a restart

Hak Pack Update

Note: Hak updates require a full server stop because players must re-download via NWSync.

  1. Create a PR targeting the 64bit branch on nwn-haks
  2. Merge the PR — CI runs build.sh and stage-haks.sh on leanthar, which builds haks and stages them to ee64
  3. On the Discord dashboard, click Stop to shut down the server (it will NOT auto-restart)
  4. Click Deploy to promote staged module + haks to live
  5. Click Restart to bring the server back up with new haks

NWNX Update

NWNX is the C++ plugin framework. Changes to plenarius/unified (including the Layonara plugin) require a Docker image rebuild.

  1. Create a PR targeting master on plenarius/unified
  2. Merge the PR — CI compiles, builds a Docker image, and pushes to ghcr.io/plenarius/unified:latest
  3. On the Discord dashboard, click Update NWNX → it shows running vs latest version → click Pull & Restart
  4. The bot pulls the new Docker image on ee64 and triggers a restart

Discord Bot Update

  1. Create a PR targeting main on discord-bot-aragen
  2. Merge the PR — CI builds a Docker image and Coolify automatically restarts the bot container
  3. No manual action needed

Release / Versioning

Use the /deploy_confirm Discord command to create a GitHub release:

  1. Run /deploy_preview to see unreleased changelog entries
  2. Run /deploy_confirm with minor or major bump
  3. This creates a GitHub tag (vX.Y) on the ee branch, which triggers release-module.yml to build a versioned module
  4. The bot posts release notes to the changelog channel, SMF forums, wiki, and in-game
  5. Bug threads in Discord get "Now Live" follow-ups

Dashboard Buttons

Button What it does
Deploy Shows a dropdown of the 5 most recent module versions (staged marked). Promotes staged files, sets NWN_MODULE, cleans hotfix overrides, restarts.
Restart Sends in-game countdown then restarts. If server is stopped, starts the container instead.
Stop Sends in-game countdown then stops the container. Server will NOT auto-restart. Use Restart to bring it back.
Update NWNX Compares running vs latest NWNX image. Pull & Restart to upgrade.
Logs Tail the last N lines of the server log.
Refresh Force-refresh the dashboard embed.

Hotfixes

For emergency single-file fixes without a full module rebuild:

  1. Use the /hotfix Discord command to SCP individual compiled scripts to /opt/layonara/nwserver-docker/server/development/ on ee64
  2. These override module scripts at runtime
  3. On the next full Deploy, non-persistent hotfix files are automatically cleaned

Infrastructure

Host Role Address
leanthar Build server, bot, wiki, forums 5.161.122.37 (Hetzner)
ee64 Game server, MariaDB, Redis 10.99.0.3 (via WireGuard)
Coolify Service management https://leanthar.layonara.com
Grafana Monitoring https://grafana.layonara.com

Servers connected via WireGuard tunnel (10.99.0.x). Bot reaches ee64 via SSH over the tunnel.