diff --git a/Dockerfile.api b/Dockerfile.api index a55b60bc..17fa2492 100644 --- a/Dockerfile.api +++ b/Dockerfile.api @@ -1,5 +1,8 @@ FROM --platform=linux/amd64 node:19.3.0 AS base +# install libvips +RUN apt-get update && apt-get install -y libvips + WORKDIR /home/node COPY src/core ./core WORKDIR /home/node/app diff --git a/Dockerfile.api.local b/Dockerfile.api.local index f8cd4194..f3b9ebbb 100644 --- a/Dockerfile.api.local +++ b/Dockerfile.api.local @@ -1,5 +1,8 @@ FROM --platform=linux/amd64 node:19.3.0 AS base +# install libvips +RUN apt-get update && apt-get install -y libvips + WORKDIR /home/node COPY src/core ./core WORKDIR /home/node/app diff --git a/Dockerfile.scheduler b/Dockerfile.scheduler index 6225e9b5..26f7eeda 100644 --- a/Dockerfile.scheduler +++ b/Dockerfile.scheduler @@ -3,6 +3,9 @@ FROM --platform=linux/amd64 node:19.3.0 AS base # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true +# install libvips +RUN apt-get update && apt-get install -y libvips + # install chromium for puppeteer RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ diff --git a/Dockerfile.scheduler.local b/Dockerfile.scheduler.local index 0bbd62d8..f29cabde 100644 --- a/Dockerfile.scheduler.local +++ b/Dockerfile.scheduler.local @@ -3,6 +3,9 @@ FROM --platform=linux/amd64 node:19.3.0 AS base # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true +# install libvips +RUN apt-get update && apt-get install -y libvips + # install chromium for puppeteer RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ diff --git a/Dockerfile.worker.local b/Dockerfile.worker.local index f6124560..dfaf3c66 100644 --- a/Dockerfile.worker.local +++ b/Dockerfile.worker.local @@ -3,6 +3,9 @@ FROM --platform=linux/amd64 node:19.3.0 AS base # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true +# install libvips +RUN apt-get update && apt-get install -y libvips + # install chromium for puppeteer RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ diff --git a/src/server/package.json b/src/server/package.json index bc12c722..6b7d63f8 100644 --- a/src/server/package.json +++ b/src/server/package.json @@ -18,8 +18,8 @@ "dev:api": "nodemon --config nodemon.api.json -x 'ts-node ./serve-api.ts'", "dev:scheduler": "nodemon --config nodemon.scheduler.json -x 'ts-node ./serve-scheduler.ts'", "dev:worker": "nodemon --config nodemon.worker.json -x 'ts-node ./serve-worker.ts'", - "build:api": "rimraf dist/serve-api.cjs && esbuild ./src/api --bundle --platform=node --outfile=./dist/serve-api.cjs", - "build:scheduler": "rimraf dist/serve-scheduler.cjs && esbuild ./src/scheduler --bundle --platform=node --outfile=./dist/serve-scheduler.cjs", + "build:api": "rimraf dist/serve-api.cjs && esbuild ./src/api --bundle --platform=node --external:sharp --outfile=./dist/serve-api.cjs", + "build:scheduler": "rimraf dist/serve-scheduler.cjs && esbuild ./src/scheduler --bundle --platform=node --external:sharp --outfile=./dist/serve-scheduler.cjs", "build:worker": "rimraf dist/serve-worker.cjs && esbuild ./src/worker --bundle --platform=node --external:sharp --outfile=./dist/serve-worker.cjs", "gen:site": "yarn test gen", "cp:core": "if [[ -d src/core ]]; then rm -rf src/core; fi && mkdir -p ./src/core/utils && cp -rf ../core/src/utils/* ./src/core/utils && cp -rf ../core/src/client/locales ./src/core/locales && cp -rf node_modules/sharp/build .",