Skip to content
Jimmy edited this page Dec 21, 2016 · 16 revisions

Welcome to the Puppies & Fluffies Wiki

Setting Up Github

Here are the basic steps to follow:

  • Step 1: Create a working Github repository
  • Step 2: Create a branch for developers or give access to developers to be able to update and push commits
  • Step 3: Anyone who has access to Github should not be able to directly merge or push into the main branch - this will prevent errors from reaching main website

Follow the steps below to obtain all code/ branches set up:

  • Step 1: Fork this repository (by doing this you get all the code/branches already set up)
  • Step 2: Go to Settings -> Branches and protect the master branch
  • Step 3: Go to collaborators (also in Settings) and add everyone who will be working on the project (either their Github account username or email)
  • Step 4: Now everyone else should go to their notifications (top right notification bell) and accept the invite to be able to push and commit code. Do not assume they will have access - accept the invite!
  • Step 5: You're done! Clone the repository, checkout to a different branch (usually Development if you are coding) and commit changes there first to check everything is good
  • Step 6: If it is good, you can submit a pull request and merge all the changes to the Master branch

Setting Up Heroku

This is where you'll be deploying your Github code to host. There are a few things that need to be done to configure Heroku to work with Laravel.

Steps:

  • Step 1: Go to your Heroku dashboard and create a new NodeJS/PHP app
  • Step 2: Go to Settings and make sure the NodeJS and PHP buildpacks are added
  • Step 3: To edit variables, click reveal config vars and add your variables. This can include DATA_BASE URL, CACHE_DRIVER, APP_KEY, and optionally your Google Analytics (ANALYTICS_PROVIDER, ANALYTICS_TRACKING_ID) variables and values
  • Step 4: Configure Domain and Certificates section so that your website (ie puppiesandfluffies.com) points to the correct heroku DNS target (in our case laravel-db.herokuapp.com). The website provider (GoDaddy, HostGator, etc) also needs to be configured to point to the heroku target
  • Step 5: In Overview, add Heroku-postgress to the addons (for the Database)
  • Step 6: In Deploy, connect the Github repository to the Heroku app, and configure automatic deployment for the specific branch (Master, Development). Also do a manual deploy to see what your code outputs, and to also get the URL from the deploy itself. Manual and auto deploys both deploy to the same URL.

Clearing up the Postgress Database

Assuming Heroku CLI is installed:

  • Login to Heroku in command line
  • heroku run --app NAMEOFAPP php artisan migrate:reset
  • heroku run --app NAMEOFAPP php artisan migrate
  • heroku run --app NAMEOFAPP php artisan db:seed

Installation link to Heroku CLI: https://devcenter.heroku.com/articles/heroku-cli