Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deployment

  • SSH into the docs.rs server through the bastion host.
  • Run docs_rs_admin build lock to lock the build queue.
  • Check the build queue until no builds are in progress.
  • Run the deploy-docs.rs Bash script.
  • If you update content that is typically cached, run docs_rs_admin cdn purge all.
  • Run docs_rs_admin build unlock to resume builds.

deploy-docs.rs will:

  • tag the old HEAD as the previous release with git 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.