From 3b6a9ccdb32dbdee87e381c1b371960a070edc7e Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:50:26 +0100 Subject: [PATCH] Fixed docker build. --- Dockerfile | 6 +++--- package.json | 3 ++- src/package.json | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a39ce882e..4e4d2e05b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,7 +96,8 @@ FROM build as development COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/ RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \ - pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } + pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } \ +RUN pnpm run next-build FROM build as production @@ -106,8 +107,7 @@ ENV ETHERPAD_PRODUCTION=true COPY --chown=etherpad:etherpad ./src ./src RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \ - pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } && \ - rm -rf ~/.npm + pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } && pnpm run next-build # Copy the configuration file. COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json diff --git a/package.json b/package.json index 891edbd5a..9bccf649a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "dev": "pnpm --filter ep_etherpad-lite run dev", "prod": "pnpm --filter ep_etherpad-lite run prod", "ts-check": "pnpm --filter ep_etherpad-lite run ts-check", - "ts-check:watch": "pnpm --filter ep_etherpad-lite run ts-check:watch" + "ts-check:watch": "pnpm --filter ep_etherpad-lite run ts-check:watch", + "next-build": "pnpm --filter ep_etherpad-lite run build-next" }, "dependencies": { "ep_etherpad-lite": "workspace:./src" diff --git a/src/package.json b/src/package.json index ce7cee82c..10dce12ee 100644 --- a/src/package.json +++ b/src/package.json @@ -123,7 +123,8 @@ "dev": "node --import tsx node/server.ts", "prod": "node --import tsx node/server.ts", "ts-check": "tsc --noEmit", - "ts-check:watch": "tsc --noEmit --watch" + "ts-check:watch": "tsc --noEmit --watch", + "build-next": "next build" }, "version": "1.9.7", "license": "Apache-2.0"