GithubHelp home page GithubHelp logo

dickdavis / bjj-hive Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 811 KB

Web app that connects Brazilian jiu-jitsu practitioners and industry event organizer.

License: GNU General Public License v3.0

Dockerfile 0.41% Ruby 74.57% JavaScript 3.74% SCSS 4.10% HTML 2.85% Haml 14.26% Shell 0.07%
ruby ruby-on-rails

bjj-hive's Introduction

BJJ Hive

Table of Contents

  • About
    • Resources
  • Getting started
    • Installation
    • Usage
  • Contributing
    • Code Style
    • Testing
  • TODO

About

This project is a platform for BJJ practitioners to view industry events in a filterable event listing.

Resources

Environments

Develop Environment

Staging Environment

Production Environment

Other Links

Heroku

LogDNA

LocationIQ

Getting Started

Installation

To install, first ensure that you have docker and docker-compose installed and running, then clone the repo:

git clone [email protected]:d3d1rty/bjj-hive.git
cd bjj-hive

Create the local .env file and specify any sensitive credentials or other environment variables.

echo "LOCATION_IQ_TOKEN=[INSERT TOKEN HERE]" > .env

Recommendation: set up bash aliases and functions for docker-compose to shorten some of the commonly used commands. Add the following to your .bashrc configuration to enable use of dew instead of docker-compose exec web and dup instead of docker-compose up.

dew() {
    docker-compose exec web $@
}

alias dup='docker-compose up'

Build the containers.

docker-compose build

Create the database and run the migrations.

docker-compose exec web bundle exec rails db:create
docker-compose exec web bundle exec rails db:migrate

Start the server.

docker-compose up

Deployment

To deploy, you will need the Heroku CLI utility installed as well as access to the app instances.

Set up the git remotes for each app instance.

heroku git:remote -a bjj-tracker-dev
git remote rename heroku heroku-dev
heroku git:remote -a bjj-tracker-staging
git remote rename heroku heroku-staging

The heroku-dev remote should be used when pushing up changes on a feature branch to test in a deployed environment prior to merging that feature branch into master. You can do this by overwriting the master branch on the heroku-dev remote (replace feature-branch with the name of your actual feature branch).

git push heroku-dev feature-branch:master

After merging a feature branch into master, you can deploy the changes to the staging environment of the production pipeline for acceptance testing. Changes should be promoted to production via the pipeline functionality within the Heroku web interface after acceptance testing has passed.

git push heroku-staging master

Usage

Usage instructions will be published as features are rolled out.

Contributing

Code Style

For ruby, we use Rubocop to enforce code style and Reek to find code smells. To manually run rubocop, you can run the following commands:

# Run rubocop for the entire project
docker-compose exec web bundle exec rubocop
# Run rubocop for a specific file
docker-compose exec web bundle exec rubocop foo/bar.rb

To manually run reek, you can execute:

docker-compose exec web bundle exec reek

For Javascript, we use ESLint with the Standard rules. To run the linter, execute:

eslint app/assets/javascripts

For stylesheets, we use Stylelint. To run the linter, execute:

stylelint app/assets/stylesheets

Testing

The test suite is executed on every commit to GitLab, and it can be run manually on your local machine:

docker-compose exec web bundle exec rspec

TODO

  • Everything.

bjj-hive's People

Watchers

James Cloos avatar Dick Davis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.