container: sincronizar antes de monit y copiar Gemfile modificado

This commit is contained in:
f 2019-07-29 16:21:34 -03:00
parent 5129e6d8d6
commit 11b945721e
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -92,17 +92,19 @@ RUN tar xf /tmp/sutty.tar.gz && rm /tmp/sutty.tar.gz
COPY --from=build --chown=app:www-data /home/app/sutty/public/assets public/assets
COPY --from=build --chown=app:www-data /home/app/sutty/vendor vendor
COPY --from=build --chown=app:www-data /home/app/sutty/.bundle .bundle
COPY --from=build --chown=app:www-data /home/app/sutty/Gemfile Gemfile
COPY --from=build --chown=app:www-data /home/app/sutty/Gemfile.lock Gemfile.lock
# Volver a root para cerrar la compilación
USER root
# Instalar la configuración de monit y comprobarla
RUN install -m 640 -o root -g root ./monit.conf /etc/monit.d/sutty.conf
RUN monit -t
# Sincronizar los assets a un directorio compartido
RUN apk add --no-cache rsync
COPY ./sync_assets.sh /usr/local/bin/sync_assets
RUN chmod 755 /usr/local/bin/sync_assets
# Instalar la configuración de monit y comprobarla
RUN install -m 640 -o root -g root ./monit.conf /etc/monit.d/sutty.conf
RUN monit -t
# Mantener estos directorios!
VOLUME "/srv/http/_deploy"