Dockerfile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # This file was auto-generated, do not edit it directly.
  2. # Instead run bin/update_build_scripts from
  3. # https://github.com/overleaf/internal/
  4. FROM node:24.14.1 AS base
  5. # Corepack setup, shared between all the images.
  6. ENV COREPACK_HOME=/opt/corepack
  7. RUN corepack enable && corepack install -g yarn@4.14.1
  8. ENV COREPACK_ENABLE_NETWORK=0
  9. WORKDIR /overleaf/services/notifications
  10. # Google Cloud Storage needs a writable $HOME/.config for resumable uploads
  11. # (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
  12. RUN mkdir /home/node/.config && chown node:node /home/node/.config
  13. FROM base AS app
  14. COPY package.json yarn.lock .yarnrc.yml .pnp.register.mjs /overleaf/
  15. COPY libraries/eslint-plugin/package.json /overleaf/libraries/eslint-plugin/package.json
  16. COPY libraries/fetch-utils/package.json /overleaf/libraries/fetch-utils/package.json
  17. COPY libraries/logger/package.json /overleaf/libraries/logger/package.json
  18. COPY libraries/metrics/package.json /overleaf/libraries/metrics/package.json
  19. COPY libraries/mongo-utils/package.json /overleaf/libraries/mongo-utils/package.json
  20. COPY libraries/o-error/package.json /overleaf/libraries/o-error/package.json
  21. COPY libraries/promise-utils/package.json /overleaf/libraries/promise-utils/package.json
  22. COPY libraries/settings/package.json /overleaf/libraries/settings/package.json
  23. COPY libraries/validation-tools/package.json /overleaf/libraries/validation-tools/package.json
  24. COPY services/notifications/package.json /overleaf/services/notifications/package.json
  25. COPY tools/migrations/package.json /overleaf/tools/migrations/package.json
  26. COPY .yarn/patches/ /overleaf/.yarn/patches/
  27. COPY tools/migrations/ /overleaf/tools/migrations/
  28. RUN cd /overleaf && yarn workspaces focus @overleaf/notifications overleaf
  29. COPY libraries/eslint-plugin/ /overleaf/libraries/eslint-plugin/
  30. COPY libraries/fetch-utils/ /overleaf/libraries/fetch-utils/
  31. COPY libraries/logger/ /overleaf/libraries/logger/
  32. COPY libraries/metrics/ /overleaf/libraries/metrics/
  33. COPY libraries/mongo-utils/ /overleaf/libraries/mongo-utils/
  34. COPY libraries/o-error/ /overleaf/libraries/o-error/
  35. COPY libraries/promise-utils/ /overleaf/libraries/promise-utils/
  36. COPY libraries/settings/ /overleaf/libraries/settings/
  37. COPY libraries/validation-tools/ /overleaf/libraries/validation-tools/
  38. COPY services/notifications/ /overleaf/services/notifications/
  39. COPY tools/migrations/ /overleaf/tools/migrations/
  40. ENV NODE_OPTIONS="--require /overleaf/.pnp.cjs --import /overleaf/.pnp.register.mjs"
  41. FROM app
  42. USER node
  43. CMD ["node", "--expose-gc", "app.ts"]