Skip to content

Online forum system used for discussing/approving of new rulebook changes

License

Notifications You must be signed in to change notification settings

scotthue/unicycling-rulebook

 
 

Repository files navigation

Welcome to the Rulebook Application.

<img src=“https://travis-ci.org/rdunlop/unicycling-rulebook.png?branch=master” /> <img src=“https://gemnasium.com/rdunlop/unicycling-rulebook.png” />

Dependencies

This application depends on the following services:

  • Email (required) - Using either an SMTP or AWS SES e-mailer for sending e-mails when action occur

  • Heroku (required?) - Where the application is designed to be hosted

  • Google Analytis (optional) - Report activity for metrics

  • Redis (caching) - If On Mac: ‘brew install redis`

Set the configuration variables (for local work)

echo "RACK_ENV=development" > .env
echo "PORT=9292" >> .env

cp config/secrets.yml.template config/secrets.yml

Open secrets.yml:

  update the mail settings to match your mail settings

  Set the code for creation of new rulebooks

Set up the configuration variables (on heroku)

This will set up Environment settings on heroku for all settings in the secrets.yml

rake heroku:secrets[<app-name>] RAILS_ENV=production

Example:
rake heroku:secrets[unirulebook2000] RAILS_ENV=production

Set up the local database

cd unicycling-rulebook
bundle
rake db:create
rake db:schema:load

Start the local server

bundle exec unicorn

Browse to http://localhost:9292

Heroku info

  1. Install the heroku toolchain

  2. heroku login

  3. heroku keys:add (creates a new Ssh key pair for upload)

  4. git push heroku master

  5. heroku run rake db:migrate

Deploying to Heroku

  1. Create a new heroku instance

    heroku create cedar <something>
    Example: heroku create usarulebook2013
  2. Add the heroku instance to the git remote list

    heroku git:remote -a <name of new heroku instance> -r <alias_that you want to use>
    Example: heroku git:remote -a usarulebook2013 -r rulebook

3a. Set your production settings

in secrets.yml, set your production settings in the 'production' scope

3b. Upload the settings/secrets

rake heroku:secrets[rulebook] RAILS_ENV=production
  1. Upload the code

    git push rulebook master
    
  2. Load the database

    heroku run rake db:schema:load --app usarulebook2013
  3. Install the scheduling addon:

    heroku addons:add scheduler:standard --app usarulebook2013
  4. Configure the scheduler via the webpage interface:

    heroku addons:open scheduler --app usarulebook2013
    Add Job: "rake update_proposal_states" - Daily - 05:00 UTC
  5. Restart the Dyno

    heroku restart --app usarulebook2013
  6. Start creating new rulebooks

    Browse to your server via web browser.

About

Online forum system used for discussing/approving of new rulebook changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 86.5%
  • Shell 10.8%
  • CSS 1.5%
  • Other 1.2%