Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Set up Octopi Webapp for Heroku Pushing

Johan Henkens edited this page Jun 2, 2014 · 2 revisions

Overview

This is a guide to set up Octopi-Webapp and LaPlaya so that you can push a new version to Heroku. This guide is based around, for the most part, the Github app for Mac. It should work similarly in Windows, but I haven't tested the command-line segments yet. However, the final step, pushing to heroku, does require command line use of the git tool.

  1. Install GitHub.app for Mac and launch it. It will ask you to login. Make sure to click the button to install the git commandline tools, if you do not already have them installed.
  2. Make an account on Heroku.com and email an administrator for octopi-webapp for collaboration permission on Heroku.
  3. From the github app, click on ucsb-cs-education on the left, and click Clone to Computer next to ucsb-cs-education/octopi-webapp.
  4. Click on the My Repositories button on the left.
  5. Click on the + button on the bottom, and hit Add local repository...
  6. Navigate to the directory you cloned octopi-webapp to, and then navigate to the public/student_portal/laplaya directory within that.
  7. Hit add while the laplaya directory is selected.
  8. Select laplaya from your list of repositories, and then hit the settings tab.
  9. Change the Primary remote repository to [email protected]:ucsb-cs-education/laplaya.git, and hit update remote.
  10. Install the heroku toolbelt
  11. Open your terminal, and navigate to the octopi-webapp repository.
  12. Type heroku login, and enter your credentials
  13. Type heroku git:remote add -a octopi. This will set up a new remote in your git repository for heroku
  14. Checkout the heroku branch in your local repository (git checkout heroku). You can now push this branch to heroku with: git push heroku heroku:master. Make sure to keep the heroku branch on github and on heroku in sync. Whenever you do a git push heroku heroku:master is pushes the local branch heroku to the master branch on heroku (the master branch is what runs on the web). Make sure to also do a git push origin heroku so that you push your local heroku branch to github as well.

You need to change into the laplaya directory within octopi-webapp, and pull in your latest changes from github there. Then, when you change back to the octopi-webapp directory, git status should show that 'laplaya' has changed. Commit these changes ('Updated laplaya' is fine as a commit message for just a laplaya update) to octopi-webapp and then push it to heroku as outlined with git push heroku heroku:master to deploy a new version.