BlueGit

timfa questward

Files

questward / deploy / README.md

README.md

README.md 1.2 KiB Download Raw

Production deploy (systemd)

Behaviour

On every service start (clean midnight restart, crash, or power loss recovery):

1. git fetch + git reset --hard origin/<branch> 2. git pull --ff-only 3. npm install --omit=dev 4. start node --experimental-sqlite server/src/index.js

Pull-on-crash is intentional so a fixed commit on origin can recover a bad build.

Player-facing midnight schedule (3-hour countdown toast) still lives in the Node process: it detects that origin is ahead, warns players, then exits cleanly so systemd runs the update script above.

Install on the host

cd /srv/questward/current   # or your clone
sudo ./deploy/install-service.sh

Optional env overrides:

VariableDefault
QUESTWARD_REPOparent of deploy/
QUESTWARD_USERquestward
QUESTWARD_GIT_BRANCHmaster
QUESTWARD_AUTH_CLIENT_SECRET(unset — stub auth)

See root README.md for OAuth / auth.timfalken.com setup.

TILE_MMO_* env vars are still accepted as fallbacks for older installs.

Manual ops

sudo systemctl restart questward
journalctl -u questward -f

Disable the in-process schedule locally with QUESTWARD_DEPLOY_SCHEDULER=0.

Source
1# Production deploy (systemd)
2
3## Behaviour
4
5On **every** service start (clean midnight restart, crash, or power loss recovery):
6
71. `git fetch` + `git reset --hard origin/<branch>`
82. `git pull --ff-only`
93. `npm install --omit=dev`
104. start `node --experimental-sqlite server/src/index.js`
11
12Pull-on-crash is intentional so a fixed commit on origin can recover a bad build.
13
14Player-facing midnight schedule (3-hour countdown toast) still lives in the Node
15process: it detects that origin is ahead, warns players, then exits cleanly so
16systemd runs the update script above.
17
18## Install on the host
19
20```bash
21cd /srv/questward/current # or your clone
22sudo ./deploy/install-service.sh
23```
24
25Optional env overrides:
26
27| Variable | Default |
28|----------|---------|
29| `QUESTWARD_REPO` | parent of `deploy/` |
30| `QUESTWARD_USER` | `questward` |
31| `QUESTWARD_GIT_BRANCH` | `master` |
32| `QUESTWARD_AUTH_CLIENT_SECRET` | (unset — stub auth) |
33
34See root `README.md` for OAuth / auth.timfalken.com setup.
35
36`TILE_MMO_*` env vars are still accepted as fallbacks for older installs.
37
38## Manual ops
39
40```bash
41sudo systemctl restart questward
42journalctl -u questward -f
43```
44
45Disable the in-process schedule locally with `QUESTWARD_DEPLOY_SCHEDULER=0`.