Merge pull request #6211 from overleaf/em-code-sharing

Change directory layout in service containers

GitOrigin-RevId: 09ff19db2a123cbf7691d51e9ce9be6eee264287
This commit is contained in:
Eric Mc Sween
2022-01-06 10:02:36 -05:00
committed by Copybot
parent 6ddbf23da0
commit f3f0be5c56
57 changed files with 225 additions and 210 deletions
+5 -8
View File
@@ -4,22 +4,19 @@
FROM node:14.18.1 as base
WORKDIR /app
COPY install_deps.sh /app
WORKDIR /overleaf/services/filestore
COPY services/filestore/install_deps.sh /overleaf/services/filestore/
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
FROM base as app
#wildcard as some files may not be in all repos
COPY package*.json npm-shrink*.json /app/
COPY services/filestore/package*.json /overleaf/services/filestore/
RUN npm ci --quiet
COPY . /app
COPY services/filestore /overleaf/services/filestore
FROM base
COPY --from=app /app /app
FROM app
RUN mkdir -p uploads user_files template_files \
&& chown node:node uploads user_files template_files
USER node