Skip to content

Commit

Permalink
Merge 3703e0f into 6581b94
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Mar 4, 2019
2 parents 6581b94 + 3703e0f commit 8fb7e1a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
context: ./
args:
- SECRET_KEY_BASE
dockerfile: docker/Dockerfile
dockerfile: docker/Dockerfile.dev
environment:
- RAILS_LOG_TO_STDOUT=true
- RDS_DB_NAME=dlme
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ RUN gem install bundler
COPY Gemfile /opt
COPY Gemfile.lock /opt

RUN bundle install
RUN bundle config build.nokogiri --use-system-libraries \
&& bundle install --without development test

COPY . .
RUN rake assets:precompile
Expand Down
29 changes: 29 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This image's actual base image
FROM starefossen/ruby-node:2-10

LABEL maintainer="Aaron Collier <aaron.collier@stanford.edu>"

# Set default RAILS environment
ENV RAILS_ENV=production
ENV RAILS_SERVE_STATIC_FILES=true
ENV BUNDLER_VERSION=2.0.1
ARG SECRET_KEY_BASE

# Create and set the working directory as /opt
WORKDIR /opt

RUN gem install bundler

# Copy the Gemfile and Gemfile.lock, and run bundle install prior to copying all source files
# This is an optimization that will prevent the need to re-run bundle install when only source
# code is changed and not dependencies.
COPY Gemfile /opt
COPY Gemfile.lock /opt

RUN bundle config build.nokogiri --use-system-libraries \
&& bundle install

COPY . .

# Start the server by default, listening for all connections
CMD puma -C config/puma.rb
4 changes: 3 additions & 1 deletion docker/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ LABEL maintainer="Justin Coyne <jcoyne85@stanford.edu>"

# Set default RAILS environment
ENV RAILS_ENV=production
ENV RAILS_SERVE_STATIC_FILES=true
ENV BUNDLER_VERSION=2.0.1
ARG SECRET_KEY_BASE

Expand All @@ -24,5 +25,6 @@ RUN bundle config build.nokogiri --use-system-libraries \
&& bundle install --without development test

COPY . .
# Start the server by default, listening for all connections


CMD sidekiq -C config/sidekiq.yml.erb

0 comments on commit 8fb7e1a

Please sign in to comment.