From aae96ede6fe1083f2b0c1ec2f9d9d436de316be0 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 27 Sep 2020 14:20:17 -0300 Subject: [PATCH] docker --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7226284..bc7b0be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,8 @@ WORKDIR /home/app/sutty # Copiamos solo el Gemfile para poder instalar las gemas necesarias COPY --chown=app:www-data ./Gemfile . COPY --chown=app:www-data ./Gemfile.lock . -RUN bundle install --no-cache --path=./vendor --without='test development' +RUN bundle config set no-cache 'true' +RUN bundle install --path=./vendor --without='test development' # Vaciar la caché RUN rm vendor/ruby/2.7.0/cache/*.gem @@ -58,7 +59,10 @@ COPY --chown=app:root ./config/credentials.yml.enc ./config/ COPY --chown=app:www-data ./public/assets-production ./public/assets COPY --chown=app:www-data ./public/packs-production ./public/packs -# Limpieza +# Eliminar la necesidad de un runtime JS en producción, porque los +# assets ya están pre-compilados. +RUN sed -re "/(sassc|uglifier|bootstrap|coffee-rails)/d" -i Gemfile +RUN bundle clean RUN rm -rf ./node_modules ./tmp/cache ./.git # Contenedor final