Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Deployment

Addison Martin edited this page Jun 17, 2019 · 24 revisions

Make sure you have setup your development environment first, and installed the Heroku CLI.

If you encounter any errors with this wiki, or the project in general, please submit a new issue!

Overview

The Heroku dashboard.

This project is deployed on a Heroku dyno. Deployment happens after each push to the master branch, where the Travis CI tests also all passed. As such, branch protections have been setup for master (no one can push directly to master). Instead, checkout a new branch, make your changes, and submit a pull request into master. If all tests pass and your changes are approved, then your pull request will be approved. Then it will automatically deploy to Heroku, if the tests all pass.

Connecting to the Heroku Server

heroku run bash

Note, if you get the error:

Error: Missing required flag:
-a, --app APP  app to run command against

Run the following command from the project's root directory:

heroku git:remote --app share-the-food

Viewing the Logs

Run the command

heroku logs

or, for a continuous view of the logs

heroku logs --tail

Analytics

Website analytics are captured by Google Analytics

Resetting the Database

When first deploying to Heroku, or when making database schema changes, you may need to drop and recreate the database.

Reset the Heroku database

heroku pg:reset

Migrate the database schema.

heroku run bundle exec rake db:migrate

Seed the database with sample data.

heroku run bundle exec rake db:seed

Checking the Health of Database

You can run a diagnostic test on the production database.

heroku pg:diagnose

Releases

Releases are tagged in the Github repository here.

Releases are numbered according to x.y.z, where x: major release, y: minor release, z: bug fix, etc.