df61bfc788
* [monorepo] consolidate clsi-lb host/ip env-vars Target env-var is CLSI_LB_HOST. Keep CLSI_LB_IP populated for a week. * [clsi] initial version of /convert/pdf-to-jpeg * [rails] use fake-secrets in CI and Codespaces * [rails] adapt tests for using clsi to convert PDFs to image * [rails] add rake task for comparing clsi conversion with transloadit * [clsi] double check that output.jpg is a regular file Co-authored-by: Brian Gough <brian.gough@overleaf.com> * [clsi] fix composing basename * [monorepo] fix clsi-lb host env-var post merge * [monorepo] sort dev-environment.env hosts * [rails] use local pdf file rather than downloading it again Download from the old renderer code path still. It's dead code. * [terraform] clsi: enable pdf to jpg conversion --------- Co-authored-by: Brian Gough <brian.gough@overleaf.com> GitOrigin-RevId: 5ecaa8559d299486340bb3961f06b29f7c4dfcca
69 lines
3.1 KiB
Docker
69 lines
3.1 KiB
Docker
# This file was auto-generated, do not edit it directly.
|
|
# Instead run bin/update_build_scripts from
|
|
# https://github.com/overleaf/internal/
|
|
|
|
FROM node:24.14.1 AS base
|
|
|
|
# Corepack setup, shared between all the images.
|
|
ENV PATH="/overleaf/node_modules/.bin:$PATH"
|
|
ENV COREPACK_HOME=/opt/corepack
|
|
RUN corepack enable && corepack install -g yarn@4.14.1
|
|
ENV COREPACK_ENABLE_NETWORK=0
|
|
|
|
WORKDIR /overleaf/services/clsi
|
|
COPY services/clsi/install_deps.sh /overleaf/services/clsi/
|
|
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
|
|
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
|
COPY services/clsi/entrypoint.sh /
|
|
|
|
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
|
|
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
|
|
RUN mkdir /home/node/.config && chown node:node /home/node/.config
|
|
|
|
FROM base AS app
|
|
|
|
COPY package.json yarn.lock .yarnrc.yml /overleaf/
|
|
COPY libraries/eslint-plugin/package.json /overleaf/libraries/eslint-plugin/package.json
|
|
COPY libraries/fetch-utils/package.json /overleaf/libraries/fetch-utils/package.json
|
|
COPY libraries/logger/package.json /overleaf/libraries/logger/package.json
|
|
COPY libraries/metrics/package.json /overleaf/libraries/metrics/package.json
|
|
COPY libraries/o-error/package.json /overleaf/libraries/o-error/package.json
|
|
COPY libraries/overleaf-editor-core/package.json /overleaf/libraries/overleaf-editor-core/package.json
|
|
COPY libraries/promise-utils/package.json /overleaf/libraries/promise-utils/package.json
|
|
COPY libraries/settings/package.json /overleaf/libraries/settings/package.json
|
|
COPY libraries/stream-utils/package.json /overleaf/libraries/stream-utils/package.json
|
|
COPY libraries/validation-tools/package.json /overleaf/libraries/validation-tools/package.json
|
|
COPY services/clsi/package.json /overleaf/services/clsi/package.json
|
|
COPY .yarn/patches/ /overleaf/.yarn/patches/
|
|
|
|
RUN cd /overleaf && yarn workspaces focus @overleaf/clsi overleaf
|
|
COPY libraries/eslint-plugin/ /overleaf/libraries/eslint-plugin/
|
|
COPY libraries/fetch-utils/ /overleaf/libraries/fetch-utils/
|
|
COPY libraries/logger/ /overleaf/libraries/logger/
|
|
COPY libraries/metrics/ /overleaf/libraries/metrics/
|
|
COPY libraries/o-error/ /overleaf/libraries/o-error/
|
|
COPY libraries/overleaf-editor-core/ /overleaf/libraries/overleaf-editor-core/
|
|
COPY libraries/promise-utils/ /overleaf/libraries/promise-utils/
|
|
COPY libraries/settings/ /overleaf/libraries/settings/
|
|
COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
|
|
COPY libraries/validation-tools/ /overleaf/libraries/validation-tools/
|
|
COPY services/clsi/ /overleaf/services/clsi/
|
|
|
|
FROM app AS with-texlive
|
|
|
|
RUN apt-get update \
|
|
&& apt-cache depends texlive-full | grep "Depends: " | grep -v -- "-doc" | grep -v -- "-lang-" | sed 's/Depends: //' | xargs apt-get install -y --no-install-recommends \
|
|
&& apt-get install -y --no-install-recommends fontconfig inkscape python3-pygments qpdf \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p cache compiles output \
|
|
&& chown node:node cache compiles output
|
|
|
|
CMD ["node", "--expose-gc", "app.js"]
|
|
|
|
FROM app
|
|
RUN mkdir -p cache compiles output \
|
|
&& chown node:node cache compiles output
|
|
|
|
CMD ["node", "--expose-gc", "app.js"]
|