Managing Staging - PatrickF1/GraceTunes GitHub Wiki

Deploying to Staging

We have a staging environment set up where we can safely test changes and play around with data.

To begin, add the git remote for the Heroku app.

heroku git:remote -a gracetunes-staging

Deploy current (including non-master) branch to staging.

git push staging -f `git rev-parse --abbrev-ref HEAD`:master # bash/zsh users
git push staging -f (git rev-parse --abbrev-ref HEAD):master # fish users

Access the app at http://gracetunes-stg.acts2.network.

Set A Default Heroku App

Now that there are two Heroku apps connected, many heroku commands will require you to specify which app you want to run the command on using the --app option. To avoid this, you can set the staging app as the default app.

git config heroku.remote staging

Useful Commands

Copy data from production to staging

heroku pg:copy gracetunes::DATABASE_URL DATABASE_URL --app gracetunes-staging

Get the recent logs from staging

heroku logs --app gracetunes-staging

Other

Google API

GraceTunes Staging using Google's OAuth to authenticate users. The credentials are located here.