<img src=“https://circleci.com/gh/rdunlop/unicycling-rulebook.svg?style=svg” alt=“Circle CI” /> <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
-
Google Analytics (optional) - Report activity for metrics
-
Redis (caching) - If On Mac: ‘brew install redis`
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:
-
All daemons, processes are running at all times (easier to develop features)
To do this:
-
install docker (docs.docker.com/docker-for-mac/install/)
-
run ‘./docker-setup.sh` to set up some files
-
install ‘docker `and `docker-compose`.
-
run ‘docker-compose up`
-
Create the database schema with ‘docker-compose exec app bundle exec rake db:create db:schema:load`
-
open www.lvh.me:3000/new
-
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
cd unicycling-rulebook bundle rake db:create rake db:schema:load
bundle exec unicorn Browse to http://localhost:9292
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.