mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #2569 from overleaf/as-build-changes
Build changes required for passing secrets into docker build GitOrigin-RevId: 46c221bd0f0e3ec4ec02384afb252c532d688516
This commit is contained in:
parent
de40289b38
commit
1c6ad2b7db
3 changed files with 18 additions and 13 deletions
7
services/web/.dockerignore
Normal file
7
services/web/.dockerignore
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
**/node_modules
|
||||||
|
copybara
|
||||||
|
data
|
||||||
|
public/js
|
||||||
|
public/minjs
|
||||||
|
public/stylesheets
|
||||||
|
public/manifest.json
|
|
@ -7,20 +7,28 @@ WORKDIR /app
|
||||||
|
|
||||||
FROM base as app
|
FROM base as app
|
||||||
|
|
||||||
#wildcard as some files may not be in all repos
|
|
||||||
COPY package.json package-lock.json /app/
|
COPY package.json package-lock.json /app/
|
||||||
|
|
||||||
RUN npm install --quiet
|
RUN npm install --quiet
|
||||||
|
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
|
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
|
|
||||||
COPY --from=app /app /app
|
COPY --from=app /app /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
|
|
||||||
|
RUN mkdir -p /app/data/dumpFolder && \
|
||||||
|
mkdir -p /app/data/logs && \
|
||||||
|
mkdir -p /app/data/pdf && \
|
||||||
|
mkdir -p /app/data/uploads && \
|
||||||
|
mkdir -p /app/data/zippedProjects && \
|
||||||
|
chmod -R 0755 /app/data/ && \
|
||||||
|
chown -R node:node /app/data/
|
||||||
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
CMD ["node", "--expose-gc", "app.js"]
|
CMD ["node", "--expose-gc", "app.js"]
|
||||||
|
|
|
@ -12,13 +12,3 @@ wait $LINT && echo "Lint complete" || exit 1
|
||||||
wait $FORMAT && echo "Format complete" || exit 1
|
wait $FORMAT && echo "Format complete" || exit 1
|
||||||
wait $TRANSLATIONS && echo "Translations install complete" || exit 1
|
wait $TRANSLATIONS && echo "Translations install complete" || exit 1
|
||||||
wait $WEBPACK && echo "Webpack complete" || exit 1
|
wait $WEBPACK && echo "Webpack complete" || exit 1
|
||||||
|
|
||||||
chmod -R 0755 /app/public
|
|
||||||
chown -R node:node /app/public
|
|
||||||
|
|
||||||
set -B
|
|
||||||
|
|
||||||
rm -rf /app/data
|
|
||||||
mkdir -p /app/data/{dumpFolder,logs,pdf,uploads,zippedProjects}
|
|
||||||
chmod -R 0755 /app/data/
|
|
||||||
chown -R node:node /app/data/
|
|
||||||
|
|
Loading…
Reference in a new issue