Last active
October 7, 2016 01:16
-
-
Save rachelmyers/5a7e0daad6b0599c6aa5b0feb72f534f to your computer and use it in GitHub Desktop.
Revisions
-
rachelmyers revised this gist
Oct 7, 2016 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,25 +4,28 @@ FROM ruby:2.2 # This isn't required, but give yourself some credit MAINTAINER Your Name Here <Your Email Here> # Install packages RUN apt-get update && apt-get install -y \ git \ nodejs \ tzdata # Copy your application into the container. COPY . . # Declare arguments that will vary by environment so we can pass them in ARG ASSET_HOST ARG SECRET_KEY # Build your application. RUN \ # Install application gems. bundle install --jobs 4 --without development test --with production && \ # Precompile Rails assets, using the secret keys bundle exec rake ASSET_HOST=${ASSET_HOST} SECRET_KEY=${SECRET_KEY} RAILS_ENV=production assets:precompile && \ # Clean up build package rm -rf /usr/local/lib/ruby/gems/*/cache/* && \ rm -rf ~/.gem # Run the application. CMD bin/rails server --port 3000 -
rachelmyers created this gist
Sep 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ # Our base image is Ruby 2.2; it will run on Amazon Linux. FROM ruby:2.2 # This isn't required, but give yourself some credit MAINTAINER Your Name Here <Your Email Here> # If you get a library from Homebrew (or `apt-get`) to run it locally, add it to # here, and it will be installed with `apt-get`. RUN apt-get update && apt-get install -y \ git \ nodejs \ tzdata # Copy the application into the docker container. COPY . . # run `bundle` and `assets:precompile` to do the bulk of the work. RUN \ # Install application gems. bundle install --jobs 4 --without development test --with production && \ # Precompile Rails assets. RAILS_ENV=production bundle exec rake assets:precompile && \ # Clean up build package rm -rf /usr/local/lib/ruby/gems/*/cache/* && \ rm -rf ~/.gem # Start the application :tada: CMD bin/rails server --port 3000