mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
chore(deploy): add OpenRC support and deployment helpers
Add OpenRC service and configuration files to support automated server updates on systems without systemd timers. - Add `deploy/update-loop.sh` to handle periodic updates for OpenRC. - Add `deploy/burrow-update.openrc` and `deploy/burrow-update.conf`. - Update `deploy/update.sh` to support both systemd and OpenRC service restarts. - Add `deploy/README.md` with installation instructions. - Update `.gitignore` to allow the deployment documentation.
This commit is contained in:
1 parent
9f69b3511b
commit
d20920dc3c
6 files changed
+105
-3
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# Deployment helpers
|
||||
|
||||
`update.sh` fetches the configured branch, fast-forwards only, validates changed
|
||||
JavaScript, and restarts the server only when a loaded server file changed. It
|
||||
runs as root, but uses `BURROW_USER` for Git operations.
|
||||
|
||||
## systemd
|
||||
|
||||
The existing `burrow-update.service` and `burrow-update.timer` check for an
|
||||
update every two minutes.
|
||||
|
||||
## OpenRC
|
||||
|
||||
The OpenRC service keeps a small foreground loop alive and runs the same
|
||||
updater every two minutes. It does not require cron.
|
||||
|
||||
```sh
|
||||
install -m 755 deploy/burrow-update.openrc /etc/init.d/burrow-update
|
||||
install -m 644 deploy/burrow-update.conf /etc/conf.d/burrow-update
|
||||
rc-update add burrow-update default
|
||||
rc-service burrow-update start
|
||||
```
|
||||
|
||||
Uncomment and change values in `/etc/conf.d/burrow-update` when the server is
|
||||
not installed at `/home/aj/ajc-private-server`, runs as a different user, or
|
||||
uses a differently named OpenRC service. `BURROW_UPDATE_INTERVAL` is a positive
|
||||
number of seconds and defaults to `120`.
|
||||
|
||||
`update.sh` selects OpenRC automatically when run by OpenRC. Set
|
||||
`BURROW_INIT=openrc` when running it manually or from another supervisor. Set
|
||||
`BURROW_INIT=systemd` to force systemd.
|
||||
Reference in new issue
Block a user