mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Add caching of gems [SCI-1096]
This commit is contained in:
parent
a7be37ef67
commit
29621781d6
1 changed files with 5 additions and 2 deletions
|
@ -11,6 +11,11 @@ RUN apt-get update -qq && \
|
||||||
sudo libfile-mimeinfo-perl && \
|
sudo libfile-mimeinfo-perl && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# install gems
|
||||||
|
COPY Gemfile* /tmp/
|
||||||
|
WORKDIR /tmp
|
||||||
|
RUN bundle install
|
||||||
|
|
||||||
# create app directory
|
# create app directory
|
||||||
ENV APP_HOME /usr/src/app
|
ENV APP_HOME /usr/src/app
|
||||||
RUN mkdir $APP_HOME
|
RUN mkdir $APP_HOME
|
||||||
|
@ -19,8 +24,6 @@ COPY . .
|
||||||
RUN rm -f $APP_HOME/config/application.yml
|
RUN rm -f $APP_HOME/config/application.yml
|
||||||
RUN rm -f $APP_HOME/production.env
|
RUN rm -f $APP_HOME/production.env
|
||||||
|
|
||||||
RUN bundle install
|
|
||||||
|
|
||||||
ENV RAILS_ENV production
|
ENV RAILS_ENV production
|
||||||
ENV DATABASE_URL=postgresql://postgres@db/scinote_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"
|
RUN bash -c "PAPERCLIP_HASH_SECRET=$(openssl rand -base64 128 | tr -d '\n') SECRET_KEY_BASE=$(openssl rand -hex 64) rake assets:precompile"
|
||||||
|
|
Loading…
Reference in a new issue