Home - MiYa-Solutions/sbcx GitHub Wiki

Release Management

For version control methodology: click here

Styling

Database

for copying production db to staging

  1. export prod db using by typing 'heroku pgbackups:capture --app subcontrax'

  2. run 'heroku pgbackups:url --app subcontrax ' to get the dump file url

  3. create a new database under the staging app by running 'heroku addons:add heroku-postgresql:dev --app sbcx-staging'

  4. import the dump to the new database by running 'heroku pgbackups:restore [new database color name] [url from step 2 surrounded by single quotes]'

  5. promote the application to use the new database by running 'pg:promote HEROKU_POSTGRESQL_COLOR_URL --app sbcx-staging'

  6. when done testing revert back to the old url by running 'heroku pg:promote HEROKU_POSTGRESQL_OLD_COLOR_URL --app sbcx-staging'

#Staging

##To push to staging

  1. create a temp branch out of dev
  2. compile assets
  3. run 'git push -f staging temp-staging:master'