<img src=“https://travis-ci.org/rdunlop/unicycling-rulebook.png?branch=master” /> <img src=“https://gemnasium.com/rdunlop/unicycling-rulebook.png” />
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`
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
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
cd unicycling-rulebook bundle rake db:create rake db:schema:load
bundle exec unicorn Browse to http://localhost:9292
-
Install the heroku toolchain
-
heroku login
-
heroku keys:add (creates a new Ssh key pair for upload)
-
git push heroku master
-
heroku run rake db:migrate
-
Create a new heroku instance
heroku create cedar <something> Example: heroku create usarulebook2013
-
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
-
Upload the code
git push rulebook master
-
Load the database
heroku run rake db:schema:load --app usarulebook2013
-
Install the scheduling addon:
heroku addons:add scheduler:standard --app usarulebook2013
-
Configure the scheduler via the webpage interface:
heroku addons:open scheduler --app usarulebook2013 Add Job: "rake update_proposal_states" - Daily - 05:00 UTC
-
Restart the Dyno
heroku restart --app usarulebook2013
-
Start creating new rulebooks
Browse to your server via web browser.