Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Heroku Maintaining

Seamus Smith edited this page May 25, 2022 · 6 revisions

Heroku Maintaining

Required Config Vars (CASE SENSITIVE)

# This is automatically defined by Heroku. This is how ratatoskr connects to the database
DATABASE_URL
# Gmail Credentials for ratatoskr@techhigh.us
# The password is **NOT** the password for the ratatoskr@techhigh.us account, it is a specially generated password.
# This password is managed by going into ratatoskr's Account Settings > Security > Signing Into Other Sites > App Passwords
email
email_password 
# Google API application
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
# Define this to let the server know that it is running in a production environment
PRODUCTION: "True"
# THIS KEY IS USED IN HASHING AND SALTING. ONLY CHANGE WHEN NEEDED OR USER DATA MAY BE LOST
SECRET_KEY
# The URL the site is being hosted on
SITE_URL

Changing SITE_URL, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET in production

  1. Make your desired changes to these config vars
  2. On Heroku at the top right, click on the "More" dropdown next to "Open App"
  3. In the "heroku run" field, enter in ./ratatoskr/manage.py initsocialapp --config
  4. Wait
  5. All new settings are pushed to production. Good job.

Pushing to Production

Using GitHub integration

In the "Deploy" tab, click on the "Connect to Github" icon. After clicking it, there should be a deploy button below it. Click, wait, and now everything is deployed

Using Heroku Git

In the case that deploying through GitHub integration isn't an option, deploying directly through Git is always an option.

  1. Install the Heroku CLI
  2. Open a terminal and login to heroku through the CLI with the heroku login command.
    - If you are on an SSH connection, add the -i flag. If you do not know what an SSH connection is, you are not on an SSH connection.
  3. Cd to your preferred directory (we are going to do a git clone).
  4. Run heroku git:clone -a ratatoskr-meeting-system
  5. cd ./ratatoskr-meeting-system
  6. git remote add origin https://github.com/worcestertechnicalhighschool/ratatoskr.git
  7. git pull origin master
  8. git push heroku master
  9. Wait until Heroku completes the build process (it is not done until the command finishes)
  10. Repeat steps 7-9 with the same repo to deploy again if desired.