diff --git a/docs/deployment.md b/docs/deployment.md index ba601eb..5669a19 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -184,6 +184,11 @@ ssh @ The tarball unpacks to a `werkator/` directory, so it must not be extracted over `~/opt` directly — unpack it in `/tmp` and move it into place, as above. Rollback is the reverse: stop, remove the new directory (or jar), move `.bak` back, start. +`tools/remote --env-file .env. werkator instance-update` does the same sequence for any host, not only the webspace layout it was written for. +Three optional keys in the env file name what differs (see the script's header): `WERKATOR_REPO_DIR` (directory of the watched repository, which also names the systemd unit), `WERKATOR_INSTALL_DIR` (where the runtime bundle is unpacked), and `WERKATOR_SANDBOX` (`bwrap`, the default, or `docker` — a Docker host has no werkdock binary and no rootfs archive to upload). +Their defaults are the layout `instance-install` creates, so an env file that names none of them behaves exactly as before. +The upload happens before the service is stopped and every artifact is checksum-verified after the transfer, so a dropped connection costs the transfer and not the running service. + Then check `https:///` for the new version in the footer, and `journalctl --user -u werkator-.service -n 50` for a clean start. Config file changes are not needed for an update; new keys take their defaults. @@ -335,6 +340,7 @@ tools/remote --env-file .env.mih34 port-forward start # browser tunne ``` Layout on the host: the watched repository at `$WERKATOR_PATH/werkator/`, the unpacked runtime at `$WERKATOR_PATH/.werkator/werkator/`, the werkdock binary at `$WERKATOR_PATH/.werkator/bin/werkdock`. +That is the default, not a requirement: `WERKATOR_REPO_DIR`, `WERKATOR_INSTALL_DIR` and `WERKATOR_SANDBOX` bend it to an installation that predates the script, see [Updating an Existing Installation](#updating-an-existing-installation). The rootfs archive is loaded once per source into werkdock's image store (`~/.werkdock`), shared by every repository of the user. Fill `git.account`/`git.token` in the machine config when the origin is private, and make the user's services survive logout with `loginctl enable-linger`.