rdunlop / unicycling-rulebook

Discussion, Proposal, and Voting Software for Unicycle Committees
http://iuf-rulebook-2016.committees.unicycling-software.com/rulebooks
MIT License
2 stars 2 forks source link

== Welcome to the Rulebook Application.

{Circle CI}[https://circleci.com/gh/rdunlop/unicycling-rulebook] {}[https://gemnasium.com/rdunlop/unicycling-rulebook]

== Dependencies

This application depends on the following services:

== Set the configuration variables (for local work)

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

cp config/eye.yml.template 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

Docker Development Environment

We recommend running development within a docker environment.

Benefits:

To do this:

  1. install docker (https://docs.docker.com/docker-for-mac/install/)
  2. run ./docker-setup.sh to set up some files
  3. install dockerand docker-compose.
  4. run docker-compose up
  5. Create the database schema with docker-compose exec app bundle exec rake db:create db:schema:load
  6. open http://www.lvh.me:3000/new
  7. Create a new database docker-compose run app bundle exec rake db:create db:schema:load

Setup the database

Copy `config/database_template.yml` to `config/database.yml`  and make
  any necessary adjustments for your local environment.

Non-Docker Deveolpment Environment

== 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

= Log Rotation settings:

It is assumed that the server is running logrotate. In order to have the production logs backed up in a rotating basis, install the logrotation file server_config/unicorn-unicycling-rulebook-logs into the /etc/logrotate.d/ directory.