overleaf/services/web/Dockerfile
Alasdair Smith db610f7efb Merge pull request #2657 from overleaf/revert-2650-revert-2570-as-sentry-source-maps
Bring back upload source maps to Sentry

GitOrigin-RevId: 22024e3ec2462d0bc9ad9c14e8d1c21880c55cd1
2020-04-01 03:21:16 +00:00

40 lines
776 B
Docker

FROM node:10.19.0 as base
WORKDIR /app
# install_deps changes app files and installs npm packages
# as such it has to run at a later stage
FROM base as app
COPY package.json package-lock.json /app/
RUN npm install --quiet
COPY . /app
# Set environment variables for Sentry
ARG SENTRY_RELEASE
ARG BRANCH_NAME
ENV SENTRY_RELEASE=$SENTRY_RELEASE
ENV BRANCH_NAME=$BRANCH_NAME
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
FROM base
COPY --from=app /app /app
WORKDIR /app
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
CMD ["node", "--expose-gc", "app.js"]