Merge pull request #6542 from overleaf/jpa-em-code-sharing-workspaces

[misc] npm workspaces

GitOrigin-RevId: 87aa72db6637fb238d7cd35b0a48ac3ed58ab3eb
This commit is contained in:
Jakob Ackermann
2022-02-16 11:31:07 +00:00
committed by Copybot
parent b2062462e7
commit fbf86af2c5
111 changed files with 80687 additions and 92611 deletions
-1
View File
@@ -1,4 +1,3 @@
.DS_Store
.git/
libraries/
services/git-bridge
+6
View File
@@ -11,6 +11,8 @@ WORKDIR /overleaf
# -------------------------
ADD server-ce/genScript.js /overleaf/genScript.js
ADD server-ce/services.js /overleaf/services.js
ADD package.json package-lock.json /overleaf/
ADD libraries/ /overleaf/libraries/
ADD services/ /overleaf/services/
# Store the revision
@@ -18,6 +20,10 @@ ADD services/ /overleaf/services/
ARG MONOREPO_REVISION
RUN echo "monorepo-server-ce,$MONOREPO_REVISION" > /var/www/revisions.txt
# Upgrade npm for workspaces support
# ----------------------------------
RUN npm install -g npm@7.24.2
# Install npm dependencies
# ------------------------
RUN node genScript install | bash
+1 -12
View File
@@ -5,18 +5,7 @@ console.log('set -ex')
switch (process.argv.pop()) {
case 'install':
for (const service of services) {
console.log('pushd', `services/${service.name}`)
switch (service.name) {
case 'web':
console.log('npm ci')
break
default:
// TODO(das7pad): revert back to npm ci --only=production (https://github.com/overleaf/issues/issues/4544)
console.log('npm ci')
}
console.log('popd')
}
console.log('npm ci')
break
case 'compile':
for (const service of services) {