From ed343e7a163ba75fe654044306062a75f2421ffe Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 27 Sep 2024 11:31:10 +0100 Subject: [PATCH] Move webpack:production out of install_deps (#20542) GitOrigin-RevId: 43d0352e5ecccf057c2de47602a63f82d277d284 --- services/web/Dockerfile | 5 +---- services/web/install_deps.sh | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100755 services/web/install_deps.sh diff --git a/services/web/Dockerfile b/services/web/Dockerfile index 96e495977c..58f53eb150 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -4,9 +4,6 @@ FROM node:18.20.2 AS base WORKDIR /overleaf/services/web -# install_deps changes app files and installs npm packages -# as such it has to run at a later stage - # Google Cloud Storage needs a writable $HOME/.config for resumable uploads # (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream) RUN mkdir /home/node/.config && chown node:node /home/node/.config @@ -55,7 +52,7 @@ USER node # the webpack image has deps+src+webpack artifacts FROM dev AS webpack USER root -RUN chmod 0755 ./install_deps.sh && ./install_deps.sh +RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.webpack.js npm run webpack:production # intermediate image for removing source maps ahead of copying into final production image diff --git a/services/web/install_deps.sh b/services/web/install_deps.sh deleted file mode 100755 index aea341bf49..0000000000 --- a/services/web/install_deps.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -OVERLEAF_CONFIG=/overleaf/services/web/config/settings.webpack.js npm run webpack:production & WEBPACK=$! - -wait $WEBPACK && echo "Webpack complete" || exit 1