Add your SSH key to your Hatchbox web server.
SSH into your web server: ssh deploy@x.x.x.
ssh deploy@x.x.x.
cd into the app's current directory: cd myapp/current
cd myapp/current
Run bundle exec rails c to open the Rails console.
bundle exec rails c
You'll need to do a couple things:
Set your Hatchbox App's RAILS_ENV environment variable to staging
RAILS_ENV
staging
Copy the production environment config to stagingcp config/environments/{production,staging}.rb
cp config/environments/{production,staging}.rb
Update any other config files to include staging. Common ones you will want to make sure are configured:
config/cable.yml
config/secrets.yml
Commit and push these changes to git
Deploy to Hatchbox (consider using a staging branch for all staging code)
Last updated 7 years ago