reorganized main build stage for caching
- frequent operations - last - rare operations - on the top - group chmod operations - chown - after all file operations
This commit is contained in:
+11
-11
@@ -28,20 +28,20 @@ RUN \
|
||||
|
||||
FROM umputun/baseimage:app-latest
|
||||
|
||||
COPY --from=build-backend /go/src/github.com/umputun/remark/remark /srv/
|
||||
COPY --from=build-frontend /srv/web/public/ /srv/web
|
||||
RUN chown -R umputun:umputun /srv
|
||||
|
||||
ADD start.sh /srv/start.sh
|
||||
RUN chmod +x /srv/start.sh
|
||||
|
||||
ADD scripts/import-disqus.sh /srv/import-disqus.sh
|
||||
ADD scripts/restore-backup.sh /srv/restore-backup.sh
|
||||
RUN chmod +x /srv/import-disqus.sh /srv/restore-backup.sh
|
||||
|
||||
WORKDIR /srv
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD curl --fail http://localhost:8080/ping || exit 1
|
||||
|
||||
ADD scripts/import-disqus.sh /srv/import-disqus.sh
|
||||
ADD scripts/restore-backup.sh /srv/restore-backup.sh
|
||||
|
||||
ADD start.sh /srv/start.sh
|
||||
|
||||
RUN chmod +x /srv/start.sh /srv/import-disqus.sh /srv/restore-backup.sh
|
||||
|
||||
COPY --from=build-backend /go/src/github.com/umputun/remark/remark /srv/
|
||||
COPY --from=build-frontend /srv/web/public/ /srv/web
|
||||
RUN chown -R umputun:umputun /srv
|
||||
|
||||
CMD ["/srv/start.sh"]
|
||||
ENTRYPOINT ["/init.sh"]
|
||||
|
||||
Reference in New Issue
Block a user