Deployment
- SSH into the docs.rs server through the bastion host.
- Run
docs_rs_admin build lockto lock the build queue. - Check the build queue until no builds are in progress.
- Run the
deploy-docs.rsBash script. - If you update content that is typically cached, run
docs_rs_admin cdn purge all. - Run
docs_rs_admin build unlockto resume builds.
deploy-docs.rs will:
- tag the old
HEADas the previous release withgit tag, - pull the repository with
git pull, - run a build,
- copy the binaries,
- restart the systemd services,
- run database migrations, and
- purge the CDN of static content stored in the repository.
There is also a revert-docs.rs script that reverts to the previously tagged
release. It doesn’t revert database migrations.
Configuration
To update a service’s configuration, update the corresponding dotenv file. See the systemd setup for details.