Dockerfile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 PATH="/overleaf/node_modules/.bin:$PATH"
  7. ENV COREPACK_HOME=/opt/corepack
  8. RUN corepack enable && corepack install -g yarn@4.14.1
  9. ENV COREPACK_ENABLE_NETWORK=0
  10. WORKDIR /overleaf/services/chat
  11. # Google Cloud Storage needs a writable $HOME/.config for resumable uploads
  12. # (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
  13. RUN mkdir /home/node/.config && chown node:node /home/node/.config
  14. FROM base AS app
  15. COPY package.json yarn.lock .yarnrc.yml /overleaf/
  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 services/chat/package.json /overleaf/services/chat/package.json
  24. COPY tools/migrations/package.json /overleaf/tools/migrations/package.json
  25. COPY .yarn/patches/ /overleaf/.yarn/patches/
  26. COPY tools/migrations/ /overleaf/tools/migrations/
  27. RUN cd /overleaf && yarn workspaces focus @overleaf/chat overleaf
  28. COPY libraries/fetch-utils/ /overleaf/libraries/fetch-utils/
  29. COPY libraries/logger/ /overleaf/libraries/logger/
  30. COPY libraries/metrics/ /overleaf/libraries/metrics/
  31. COPY libraries/mongo-utils/ /overleaf/libraries/mongo-utils/
  32. COPY libraries/o-error/ /overleaf/libraries/o-error/
  33. COPY libraries/promise-utils/ /overleaf/libraries/promise-utils/
  34. COPY libraries/settings/ /overleaf/libraries/settings/
  35. COPY services/chat/ /overleaf/services/chat/
  36. COPY tools/migrations/ /overleaf/tools/migrations/
  37. FROM app
  38. USER node
  39. CMD ["node", "--expose-gc", "app.js"]