Skip to content

rais24/Testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fitly Rails

Required Installs

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

Deployment Setup

Read about deployments here

Development Login

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

Environment Variables

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.

Required Variables

  • IMAGE_MAGICK_HOME - the path to your imagemagick executable. 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 Key
  • STRIPE_TEST_PUBLIC - Test version of Stripe Public Key
  • STRIPE_SECRET - Production version of Stripe Private Key
  • STRIPE_PUBLIC - Production version of Stripe Public Key
AWS Credentials
  • AWS_ACCT_NUM - Our AWS account number
  • AWS_BUCKET - The name of our AWS S3 storage bucket
  • AWS_ACCESS_KEY - Our AWS access key
  • AWS_SECRET_ACCESS_KEY - Our AWS secret key
RDS MySQL credentials
  • DB_HOST - The Hostname of our RDS instance
  • DB_PORT - The port of our RDS instance (usually 3306)
  • DB_NAME - The name of our RDS instance's DB
  • DB_USERNAME - The username to access our RDS instance
  • DB_PASSWORD - The password for our RDS username
Sidekiq Redis URL
  • REDIS_URL - Development Sidekiq-backing redis instance. Can also be set to ENV['REDISTOGO_URL'] in production
  • REDISTOGO_URL - Our production level redis URL (currently using RedisToGo)
GitHub Integration
  • GITHUB_TOKEN - fitlybot's API token. Used in party_foul bug reporting

Examples

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: abcdefghijklmnopqrstuvwxyznowiknowmyabcs

Deployment

Checkout the deployment documentation for instructions.

Development

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/seed

Then, in another terminal

# this will run `bundle` when your Gemfile changes,
# run tests when `.rb` files change, and
# will setup LiveReload
bundle exec guard

Finally, to view the page, run

open localhost:3000

or navigate to http://localhost:3000 in your browser

Windows

If you're on windows, follow this wiki.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors