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