add Makefile with make install for fedora deploy

builds and installs the systemd service from a fresh checkout; substitutes
real node path / prefix into the unit. README documents it as the quick path.
This commit is contained in:
müde 2026-06-14 22:26:10 +02:00
commit ac6a50197e
2 changed files with 93 additions and 3 deletions

View file

@ -83,9 +83,20 @@ Single Node process serves the API, both client entries (`/` tablet,
## Run as a systemd service
Template files live in [`deploy/`](deploy/): a unit ([`wutzcalc.service`](deploy/wutzcalc.service))
and an environment file ([`wutzcalc.env.example`](deploy/wutzcalc.env.example)).
They assume the built app lives in `/opt/wutzcalc` and the database in
On Fedora, the `Makefile` automates everything below — from a fresh checkout, as root:
```sh
sudo make install # system deps + build + service
sudoedit /etc/wutzcalc/wutzcalc.env # set ADMIN_PASSWORD
sudo systemctl enable --now wutzcalc
```
Override paths with e.g. `make install PREFIX=/srv/wutzcalc SERVICE_USER=wutz`.
The manual steps below do the same thing. Template files live in
[`deploy/`](deploy/): a unit ([`wutzcalc.service`](deploy/wutzcalc.service)) and
an environment file ([`wutzcalc.env.example`](deploy/wutzcalc.env.example)). They
assume the built app lives in `/opt/wutzcalc` and the database in
`/var/lib/wutzcalc` — adjust paths in the unit if yours differ.
```sh