mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-04 23:37:19 +00:00
Merge pull request #14466 from overleaf/jpa-fix-web-image
[web] fix contents of final web image GitOrigin-RevId: b09a4ddbc1c3bead2eae865570e5a1b99fc4c7fa
This commit is contained in:
parent
0bb5e27dff
commit
6120ebf156
2 changed files with 15 additions and 12 deletions
1
services/web/.dockerignore
Symbolic link
1
services/web/.dockerignore
Symbolic link
|
@ -0,0 +1 @@
|
|||
.gitignore
|
|
@ -11,6 +11,15 @@ WORKDIR /overleaf/services/web
|
|||
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
|
||||
RUN mkdir /home/node/.config && chown node:node /home/node/.config
|
||||
|
||||
RUN mkdir -p /overleaf/services/web/data/dumpFolder \
|
||||
&& mkdir -p /overleaf/services/web/data/logs \
|
||||
&& mkdir -p /overleaf/services/web/data/pdf \
|
||||
&& mkdir -p /overleaf/services/web/data/uploads \
|
||||
&& mkdir -p /overleaf/services/web/data/zippedProjects \
|
||||
&& mkdir -p /overleaf/services/web/data/projectHistories \
|
||||
&& chmod -R 0755 /overleaf/services/web/data \
|
||||
&& chown -R node:node /overleaf/services/web/data
|
||||
|
||||
# the deps image is used for caching npm ci
|
||||
FROM base as deps-prod
|
||||
|
||||
|
@ -31,23 +40,13 @@ RUN cd /overleaf && npm install
|
|||
# the dev is suitable for running tests
|
||||
FROM deps as dev
|
||||
|
||||
ARG SENTRY_RELEASE
|
||||
ENV SENTRY_RELEASE=$SENTRY_RELEASE
|
||||
COPY services/web /overleaf/services/web
|
||||
|
||||
# Build the latex parser
|
||||
RUN cd /overleaf/services/web && npm run 'lezer-latex:generate'
|
||||
|
||||
RUN mkdir -p /overleaf/services/web/data/dumpFolder \
|
||||
&& mkdir -p /overleaf/services/web/data/logs \
|
||||
&& mkdir -p /overleaf/services/web/data/pdf \
|
||||
&& mkdir -p /overleaf/services/web/data/uploads \
|
||||
&& mkdir -p /overleaf/services/web/data/zippedProjects \
|
||||
&& mkdir -p /overleaf/services/web/data/projectHistories \
|
||||
&& chmod -R 0755 /overleaf/services/web/data \
|
||||
&& chown -R node:node /overleaf/services/web/data
|
||||
|
||||
ARG SENTRY_RELEASE
|
||||
ENV SENTRY_RELEASE=$SENTRY_RELEASE
|
||||
|
||||
USER node
|
||||
|
||||
|
||||
|
@ -64,6 +63,9 @@ RUN find /overleaf/services/web/public -name '*.js.map' -delete
|
|||
|
||||
FROM deps-prod as app
|
||||
|
||||
ARG SENTRY_RELEASE
|
||||
ENV SENTRY_RELEASE=$SENTRY_RELEASE
|
||||
COPY services/web /overleaf/services/web
|
||||
COPY --from=webpack-no-sourcemaps /overleaf/services/web/public /overleaf/services/web/public
|
||||
RUN rm /overleaf/services/web/modules/server-ce-scripts -rf
|
||||
USER node
|
||||
|
|
Loading…
Reference in a new issue