Coder_Nick
Coder_Nick

Reputation: 851

Setting up staging environment for heroku app

I am coming in late to add some functionality to an already existing app hosted on heroku. The original builder has given me access and I 'heroku git:clone -a app-name' to my local computer.

I've found some conflicting instructions on how to set up a staging environment for this site. I don't want to push to the original site but want a way to try out functionality.

If anyone has had experience with staging and heroku, I'd appreciate any clarification.

Upvotes: 1

Views: 727

Answers (2)

Bala Karthik
Bala Karthik

Reputation: 1413

Please refer: Heroku - Managing Multiple Environments for an App

You Need to create a second Heroku application that hosts your staging application.

Follow the instructions provided in the link for working with multiple environment in heroku.

Upvotes: 1

trevorhinesley
trevorhinesley

Reputation: 875

You'll need to create a staging.rb file in config/environments. You can copy development.rb or production.rb and adjust whatever values you need.

Heroku will handle configuring the database configuration and such. You can clone an app in Heroku or just create a new one, then set it's RAILS_ENV and RACK_ENV environment variables to staging, and push to it.

Upvotes: 1

Related Questions