Dockerfile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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/project-history
  6. # Google Cloud Storage needs a writable $HOME/.config for resumable uploads
  7. # (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
  8. RUN mkdir /home/node/.config && chown node:node /home/node/.config
  9. FROM base AS app
  10. COPY package.json package-lock.json /overleaf/
  11. COPY libraries/fetch-utils/package.json /overleaf/libraries/fetch-utils/package.json
  12. COPY libraries/logger/package.json /overleaf/libraries/logger/package.json
  13. COPY libraries/metrics/package.json /overleaf/libraries/metrics/package.json
  14. COPY libraries/mongo-utils/package.json /overleaf/libraries/mongo-utils/package.json
  15. COPY libraries/o-error/package.json /overleaf/libraries/o-error/package.json
  16. COPY libraries/overleaf-editor-core/package.json /overleaf/libraries/overleaf-editor-core/package.json
  17. COPY libraries/promise-utils/package.json /overleaf/libraries/promise-utils/package.json
  18. COPY libraries/redis-wrapper/package.json /overleaf/libraries/redis-wrapper/package.json
  19. COPY libraries/settings/package.json /overleaf/libraries/settings/package.json
  20. COPY libraries/stream-utils/package.json /overleaf/libraries/stream-utils/package.json
  21. COPY libraries/validation-tools/package.json /overleaf/libraries/validation-tools/package.json
  22. COPY services/project-history/package.json /overleaf/services/project-history/package.json
  23. COPY tools/migrations/package.json /overleaf/tools/migrations/package.json
  24. COPY patches/ /overleaf/patches/
  25. COPY tools/migrations/ /overleaf/tools/migrations/
  26. RUN cd /overleaf && npm ci --quiet
  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/overleaf-editor-core/ /overleaf/libraries/overleaf-editor-core/
  33. COPY libraries/promise-utils/ /overleaf/libraries/promise-utils/
  34. COPY libraries/redis-wrapper/ /overleaf/libraries/redis-wrapper/
  35. COPY libraries/settings/ /overleaf/libraries/settings/
  36. COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
  37. COPY libraries/validation-tools/ /overleaf/libraries/validation-tools/
  38. COPY services/project-history/ /overleaf/services/project-history/
  39. COPY tools/migrations/ /overleaf/tools/migrations/
  40. FROM app
  41. USER node
  42. CMD ["node", "--expose-gc", "app.js"]