Skip to content

melchua/dancewise

Repository files navigation

Dancewise: Aka wheretofuckingdance

wheretofuckingdance.com

Install

Clone the repository

git clone git@github.com:melchua/dancewise.git
cd dancewise

Check your Ruby version

rbenv version

The ouput should start with something like 3.0.2

If not, install the right ruby version using rbenv (it could take a while):

brew install rbenv
rbenv install 3.0.2

Install dependencies

Using Bundler and Yarn:

bundle && yarn

Set environment variables

cp config/application.yml.template config/application.yml Enter all credential information here

Initialize the database

  1. First you need to install postgresql: brew install postgresql

  2. Install Postico (this gives you a GUI interface to interact with psql databases) brew install --cask postico

  3. Check that postgres is installed psql postgres

  4. Using postico to connect: Postico docs

Postico local setup Your username and password will default to your laptop's username and password hostname: local port: default

rails db:create db:migrate db:seed

Serve

rails s

Process for merging into master

Branch protection has been setup on the master branch. So you should never be able to merge a branch into master (remote - on GitHub) without an approved pull request (PR).

You should also not be able to (and should not) push to master directly from your dev environment. ie. git push master

The process to implement a new feature in the code is:

  1. Make sure you are have the most up-to-date master branch
git checkout master
git pull
  1. Create a new branch locally
git checkout -b your-feature-branch-name
  1. Stage and commit files in to your local branch
git add .
git status
git commit -m "One liner description of what your branch has added to the codebase"
  1. Push your branch to GitHub
git push
  1. Go the GitHub repository, create a new Pull Request for your branch to merge into master

  2. Write a description in your pull request, request a reviewer, and save the pull request

Deploy

Add heroku remotes

NOTE: THIS HAS NOT BEEN SETUP YET. DO NOT DEPLOY UNTIL SETUP

Using Heroku CLI:

heroku git:remote -a dancewise
heroku git:remote --remote heroku-staging -a dancewise-staging

With Heroku pipeline (recommended)

NOTE: THIS HAS NOT BEEN SETUP YET. THIS WILL NOT WORK. WE WILL INSTEAD PUSH TO PRODUCTION USING THE LAST SECTION, BUT WE WILL NEED TO BE VERY CAREFUL WHEN DOING THIS

Push to Heroku staging remote:

git push heroku-staging

Go to the Heroku Dashboard and promote the app to production or use Heroku CLI:

heroku pipelines:promote -a project-staging

Directly to production (not recommended)

Push to Heroku production remote:

git push heroku master
heroku run rails db:migrate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published