mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 07:06:22 +00:00
docker
This commit is contained in:
parent
e4de488225
commit
aae96ede6f
1 changed files with 6 additions and 2 deletions
|
@ -37,7 +37,8 @@ WORKDIR /home/app/sutty
|
||||||
# Copiamos solo el Gemfile para poder instalar las gemas necesarias
|
# Copiamos solo el Gemfile para poder instalar las gemas necesarias
|
||||||
COPY --chown=app:www-data ./Gemfile .
|
COPY --chown=app:www-data ./Gemfile .
|
||||||
COPY --chown=app:www-data ./Gemfile.lock .
|
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é
|
# Vaciar la caché
|
||||||
RUN rm vendor/ruby/2.7.0/cache/*.gem
|
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/assets-production ./public/assets
|
||||||
COPY --chown=app:www-data ./public/packs-production ./public/packs
|
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
|
RUN rm -rf ./node_modules ./tmp/cache ./.git
|
||||||
|
|
||||||
# Contenedor final
|
# Contenedor final
|
||||||
|
|
Loading…
Reference in a new issue