Skip to content

Instantly share code, notes, and snippets.

@heug
Last active July 13, 2017 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heug/44d4df1209a00d5e3f0708219dbfed93 to your computer and use it in GitHub Desktop.
Save heug/44d4df1209a00d5e3f0708219dbfed93 to your computer and use it in GitHub Desktop.
FundThatFlip
version: 2
references:
container_config: &container_config
working_directory: ~/root
docker:
- image: heug/docker-images:fundthatflip # replace with your dockerhub image
environment:
PGHOST: 127.0.0.1
PGUSER: root
FA_API_KEY: ENV["FA_API_KEY"]
FA_MODE: ENV["FA_MODE"]
FA_VERIFICATION_KEY: ENV["FA_VERIFICATION_KEY"]
alpha_flow_password: ENV["alpha_flow_password"]
alpha_flow_user_name: ENV["alpha_flow_user_name"]
AWS_ACCESS_KEY_ID: ENV["AWS_ACCESS_KEY_ID"]
AWS_CLOUDFRONT_ENDPOINT: ENV["AWS_CLOUDFRONT_ENDPOINT"]
AWS_FTF_CDN: ENV["AWS_FTF_CDN"]
AWS_S3_BUCKET_NAME: ENV["AWS_S3_BUCKET_NAME"]
AWS_S3_PAPERCLIP_BUCKET_NAME: ENV["AWS_S3_PAPERCLIP_BUCKET_NAME"]
AWS_S3_UPLOADS_BUCKET_NAME: ENV["AWS_S3_UPLOADS_BUCKET_NAME"]
AWS_SECRET_ACCESS_KEY: ENV["AWS_SECRET_ACCESS_KEY"]
DEVISE_SECRET_KEY: ENV["DEVISE_SECRET_KEY"]
FA_API_KEY_TEST: ENV["FA_API_KEY_TEST"]
FA_VERIFICATION_KEY_TEST: ENV["FA_VERIFICATION_KEY_TEST"]
FB_APP_ID: ENV["FB_APP_ID"]
FB_SECRET: ENV["FB_SECRET"]
G_APP_ID: ENV["G_APP_ID"]
G_BROWSER_KEY: ENV["G_BROWSER_KEY"]
G_SECRET: ENV["G_SECRET"]
google_login: ENV["google_login"]
google_password: ENV["google_password"]
hubspot_api_key: ENV["hubspot_api_key"]
hubspot_portal: ENV["hubspot_portal"]
LI_APP_ID: ENV["LI_APP_ID"]
LI_SECRET: ENV["LI_SECRET"]
paperclip_hash_secret: ENV["paperclip_hash_secret"]
RACK_ENV: ENV["RACK_ENV"]
RAILS_ENV: ENV["RAILS_ENV"]
REDIS_PROVIDER: ENV["REDIS_PROVIDER"]
SECRET_KEY_BASE: ENV["SECRET_KEY_BASE"]
server_mode: ENV["server_mode"]
RAILS_ENV: ENV["RAILS_ENV"]
- image: circleci/postgres:9.4.12-alpine
js_cache_key: &js_cache_key
key: npm-dependency-cache-{{ checksum "package.json" }}
ruby_cache_key: &ruby_cache_key
key: bundler-dependency-cache-{{ checksum "Gemfile.lock" }}
jobs:
build:
<<: *container_config
steps:
- checkout
- restore_cache:
<<: *js_cache_key
- run:
name: Install node dependencies
command: npm install
# - run:
# name: Install node dependencies
# command: yarn
- save_cache:
<<: *js_cache_key
paths:
- ~/root/node_modules
- restore_cache:
<<: *ruby_cache_key
- run:
name: Install ruby dependencies
command: bundle install --path vendor/bundle
- save_cache:
<<: *ruby_cache_key
paths:
- vendor/bundle
- run:
name: Compile
command: npm run build:prod
- run:
name: bundle exec rake db
command: bundle exec rake db:create db:structure:load db:migrate --trace RAILS_ENV=test
- run:
name: Start test
command: bundle exec rake spec RAILS_ENV=test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment