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/tile-mmo/current # or your clone
sudo ./deploy/install-service.sh
Optional env overrides:
| Variable | Default |
|---|---|
TILE_MMO_REPO | parent of deploy/ |
TILE_MMO_USER | tilemmo |
TILE_MMO_GIT_BRANCH | master |
Manual ops
sudo systemctl restart tile-mmo
journalctl -u tile-mmo -f
Disable the in-process schedule locally with TILE_MMO_DEPLOY_SCHEDULER=0.
Source
| 1 | # Production deploy (systemd) |
| 2 | |
| 3 | ## Behaviour |
| 4 | |
| 5 | On **every** service start (clean midnight restart, crash, or power loss recovery): |
| 6 | |
| 7 | 1. `git fetch` + `git reset --hard origin/<branch>` |
| 8 | 2. `git pull --ff-only` |
| 9 | 3. `npm install --omit=dev` |
| 10 | 4. start `node --experimental-sqlite server/src/index.js` |
| 11 | |
| 12 | Pull-on-crash is intentional so a fixed commit on origin can recover a bad build. |
| 13 | |
| 14 | Player-facing midnight schedule (3-hour countdown toast) still lives in the Node |
| 15 | process: it detects that origin is ahead, warns players, then exits cleanly so |
| 16 | systemd runs the update script above. |
| 17 | |
| 18 | ## Install on the host |
| 19 | |
| 20 | ```bash |
| 21 | cd /srv/tile-mmo/current # or your clone |
| 22 | sudo ./deploy/install-service.sh |
| 23 | ``` |
| 24 | |
| 25 | Optional env overrides: |
| 26 | |
| 27 | | Variable | Default | |
| 28 | |----------|---------| |
| 29 | | `TILE_MMO_REPO` | parent of `deploy/` | |
| 30 | | `TILE_MMO_USER` | `tilemmo` | |
| 31 | | `TILE_MMO_GIT_BRANCH` | `master` | |
| 32 | |
| 33 | ## Manual ops |
| 34 | |
| 35 | ```bash |
| 36 | sudo systemctl restart tile-mmo |
| 37 | journalctl -u tile-mmo -f |
| 38 | ``` |
| 39 | |
| 40 | Disable the in-process schedule locally with `TILE_MMO_DEPLOY_SCHEDULER=0`. |