diff --git a/Dockerfile.production b/Dockerfile.production index f47aa0598..e29c7e4d3 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -11,6 +11,11 @@ RUN apt-get update -qq && \ sudo libfile-mimeinfo-perl && \ rm -rf /var/lib/apt/lists/* +# install gems +COPY Gemfile* /tmp/ +WORKDIR /tmp +RUN bundle install + # create app directory ENV APP_HOME /usr/src/app RUN mkdir $APP_HOME @@ -19,8 +24,6 @@ COPY . . RUN rm -f $APP_HOME/config/application.yml RUN rm -f $APP_HOME/production.env -RUN bundle install - ENV RAILS_ENV production ENV DATABASE_URL=postgresql://postgres@db/scinote_production RUN bash -c "PAPERCLIP_HASH_SECRET=$(openssl rand -base64 128 | tr -d '\n') SECRET_KEY_BASE=$(openssl rand -hex 64) rake assets:precompile"