If you're on OSX, checkout our-boxen. If not, here's the stack (check the fitly-rails boxen project repo for our up to date stack
- MySQL 5.5.20
- Redis 2.6.9
- Ruby 2.0.0
- Imagemagick 6.8.0-10
- PhantomJS stable 1.9.0
Read about deployments here
After you run script/seed, there is a single account created. You should be able to navigate to /login and authenticate as admin with the password of passw0rd
To comply with the 12-factor App conventions, we do our configuration through environment variables
ent variables from a .env file (located in the root directory) into Ruby's ENV variable
NOTE: Since each configuration is potentially different, the .env file is excluded from version control. It can be found in the fitly/our-boxen repository HERE.
IMAGE_MAGICK_HOME- the path to yourimagemagickexecutable. INCLUDE THE TRAILING SLASH. To determine where this is, try running:
# this will point you to the executable. In this example, set IMAGE_MAGICK_HOME to `/path/to/`
which identify # => /path/to/identify-
FITLY_MAIL_USERNAME- the name of the email account that will send emails. in development, this can be garbage. In production, it will probably be[email protected] -
FITLY_MAIL_PASSWORD- the outgoing email password. In development, this can be garbage. In production, it will probably be the password to[email protected] -
FITLY_APPLICATION_TOKEN- this is the token used for csrf
Stripe Info (sign in via username '[email protected]')
STRIPE_TEST_SECRET- Test version of Stripe Private KeySTRIPE_TEST_PUBLIC- Test version of Stripe Public KeySTRIPE_SECRET- Production version of Stripe Private KeySTRIPE_PUBLIC- Production version of Stripe Public Key
AWS_ACCT_NUM- Our AWS account numberAWS_BUCKET- The name of our AWS S3 storage bucketAWS_ACCESS_KEY- Our AWS access keyAWS_SECRET_ACCESS_KEY- Our AWS secret key
DB_HOST- The Hostname of our RDS instanceDB_PORT- The port of our RDS instance (usually 3306)DB_NAME- The name of our RDS instance's DBDB_USERNAME- The username to access our RDS instanceDB_PASSWORD- The password for our RDS username
REDIS_URL- DevelopmentSidekiq-backingredisinstance. Can also be set toENV['REDISTOGO_URL']inproductionREDISTOGO_URL- OurproductionlevelredisURL (currently using RedisToGo)
GITHUB_TOKEN-fitlybot's API token. Used inparty_foulbug reporting
For a *NIX machine, a .env file could look like this
# on a linux machine, it is probably '/usr/bin`
# the example below is for an OSX machine with homebrew
IMAGE_MAGICK_HOME: /usr/local/homebrew/bin/
FITLY_MAIL_USERNAME: [email protected]
FITLY_MAIL_PASSWORD: garbagepassword
FITLY_APPLICATION_TOKEN: GARBAGE
# Stripe Credentials
STRIPE_TEST_SECRET: <%= ENV['MY_ENV_VARIABLE'] %>
STRIPE_TEST_PUBLIC: <%= ENV['MY_ENV_VARIABLE'] %>
STRIPE_SECRET: GARBAGE
STRIPE_PUBLIC: GARBAGE
# AWS Credentials
AWS_ACCT_NUM: 1234567890
AWS_BUCKET: my-s3-bucket
AWS_ACCESS_KEY: 50M3UGLY5HA
AWS_SECRET_ACCESS_KEY: 50M3UGLY5HA
# RDS MySQL credentials
DB_HOST: myrdshostnmae.us-CARDINAL-1.rds.amazonaws.com
DB_PORT: 3306
DB_NAME: myrdsdb
DB_USERNAME: myrdsusername
DB_PASSWORD: myrdspassword
# Sidekiq Redis URL
REDIS_URL: redis://localhost:6379
REDISTOGO_URL: redis://redistogo:[email protected]:10081/
GITHUB_TOKEN: abcdefghijklmnopqrstuvwxyznowiknowmyabcsCheckout the deployment documentation for instructions.
To run, make sure you have ruby version 2.0.0 installed on your machine.
Next, run
# use fitly/fitly-rails if you have the `hub` gem installed
git clone https://github.com/fitly/fitly-rails
# go into the directory
cd fitly-rails
# run the server. this will also install all the necessary gems
# into vendor/gems using bundler
script/server
# to fill the database
script/seedThen, in another terminal
# this will run `bundle` when your Gemfile changes,
# run tests when `.rb` files change, and
# will setup LiveReload
bundle exec guardFinally, to view the page, run
open localhost:3000or navigate to http://localhost:3000 in your browser
If you're on windows, follow this wiki.