add a one-click deploy script for the self-hosted build
This commit is contained in:
@@ -33,6 +33,27 @@ npm run build
|
||||
- `npm run test:e2e` runs Playwright browser tests against a mocked BFF API.
|
||||
- `npm run build` type-checks and builds both client and server.
|
||||
|
||||
## One-Click Deploy
|
||||
|
||||
`deploy.sh` deploys a checkout to a host that runs the built server under
|
||||
systemd:
|
||||
|
||||
```bash
|
||||
./deploy.sh # pull, install, build, restart, verify
|
||||
./deploy.sh --dry-run # print the plan and exit
|
||||
./deploy.sh --help # all options
|
||||
```
|
||||
|
||||
It pulls `origin/main` with `--ff-only`, reinstalls dependencies only when
|
||||
`package-lock.json` changed, rebuilds the `node-pty` native module, builds the
|
||||
client and the server, restarts the `hermes-ui.service` unit, and verifies the
|
||||
result against both `/health` and `/api/auth/status`. The previous `dist/` is
|
||||
backed up to `~/.local/state/hermes-ui-deploy/backups/` first and restored
|
||||
automatically when the build or the health check fails.
|
||||
|
||||
`start.sh` is the development launcher (foreground Vite + Koa); `deploy.sh` is
|
||||
the production path. Do not mix them.
|
||||
|
||||
## Platform Notes
|
||||
|
||||
The server runs on Windows, macOS, and Linux. The parts that differ are
|
||||
|
||||
Reference in New Issue
Block a user