Create a staging on DigitalOcean

I have an app running hosted on digital ocean, now i need to create a staging for testing before pushing the content. What is the easiest and with less configuration way to do this? A step-by-step would be great. Basically it will be the same as de production, but with it’s on DB.

1 Like

How are you currently deploying this? Is it a droplet, or are you using the container hosting service?

I just went through this last week.

  1. I duplicated the database at the command line, creating a new app_name_staging variant of the app_name_production, and filled it with a recent dump of the production data.
  2. I updated the Rails app to have a staging target in:
    • config/environments/staging.rb
    • config/database.yml
    • config/deploy/staging.rb
  3. Ran cap staging deploy

Then I updated my NGINX config to add a staging host referencing the new directory configured in my deploy/staging file. And added the host to DNS. And restarted NGINX.

Your mileage will definitely vary.


Hi, Walter, it is a droplet