Deploy to a staging server with Hatchbox & Digital Ocean

A hands-on walkthrough of getting the bookmarking app deployed to a live staging environment for the first time. Brian creates the staging branch and Git workflow, spins up a server through Hatchbox's Digital Ocean integration, wires up the app to GitHub, configures environment variables and the Postgres database, and ships the first successful deploy.

  • Creating and pushing a staging branch alongside main, plus the staging → production Git workflow

  • Spinning up a new Hatchbox cluster connected to Digital Ocean (server size, region, services)

  • Adding the app in Hatchbox and connecting it to the GitHub repository

  • Pointing the staging app at the staging branch with automatic deploys enabled

  • Setting RAILS_MASTER_KEY and RAILS_ENV environment variables

  • Provisioning the Postgres database and confirming the auto-generated DATABASE_URL

  • Running the first deployment and using Claude Code to debug logs if it fails

  • Verifying the live staging site on the temporary Hatchbox domain

← Back to library