...
Generated with Raygun.
To run the specs or fire up the server, be sure you have these:
- Ruby 2.1 (see .ruby-version)
- PostgreSQL 9.x with superuser 'postgres' with no password (
createuser -s postgres
) - PhantomJS for JavaScript testing (
brew install phantomjs
)
After cloning, run these commands to install missing gems and prepare the database.
$ gem install bundler
$ bundle
$ rake db:setup db:sample_data
Note, rake db:sample_data
loads a small set of data for development. Check out db/sample_data.rb
for details.
To run all ruby and javascript specs.
$ rake
Again, with coverage for the ruby specs:
$ rake spec:coverage
$ foreman start
$ open http://localhost:3000
Guard is configured to run ruby and jasmine specs, and also listen for livereload connections. Growl is used for notifications.
$ bundle exec guard
$ gem install mailcatcher
$ mailcatcher
$ open http://localhost:1080/
Learn more at mailcatcher.me. And please don't add mailcatcher to the Gemfile.
This project is configured for continuous integration and deployment with CircleCI and Heroku. Follow these steps for first time configuration:
- Push the project to GitHub, if you haven't already.
- Authenticate at circleci.com and follow this project.
- Be sure to enable Heroku deploys from the project settings on circleci.com.
- The project should automatically be deployed on every successful build.
Check out circle.yml and bin/deploy.sh for details.
Install the Heroku toolbelt if you don't already have it (https://toolbelt.heroku.com/).
$ heroku apps:create dockerapp
$ git push heroku master
$ heroku run rake db:migrate db:seed
Continuous deployment from the build server is highly recommended.
Several common features and operational parameters can be set using environment variables. These are all optional.
SECRET_KEY_BASE
- Secret key base for verfying signed cookies. Should be 30+ random characters and secret!HOSTNAME
- Canonical hostname for this application. Other incoming requests will be redirected to this hostname.BASIC_AUTH_PASSWORD
- Enable basic auth with this password.BASIC_AUTH_USER
- Set a basic auth username (not required, password enables basic auth).PORT
- Port to listen on (default: 3000).UNICORN_WORKERS
- Number of unicorn workers to spawn (default: development 1, otherwisee 3) .UNICORN_BACKLOG
- Depth of unicorn backlog (default: 16).
...