From 7036f9ef42dd6f1469d64e806aabf82873e847bf Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Sun, 3 May 2026 11:01:21 +0700 Subject: [PATCH] Dockerfile: clone, build and install patched emdash source --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34f1cf2..1484a58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,6 @@ RUN apk add --no-cache python3 make g++ sqlite git WORKDIR /app -# Clone patched emdash source -RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-patch - COPY package.json pnpm-lock.yaml* ./ RUN corepack enable && corepack prepare pnpm@9.0.0 --activate RUN pnpm install @@ -15,12 +12,19 @@ FROM deps AS builder WORKDIR /app -# Copy patched emdash into node_modules -COPY --from=deps /app/emdash-patch /app/node_modules/emdash +# Clone and build patched emdash source +RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-source +WORKDIR /app/emdash-source +RUN pnpm install && pnpm build --filter @emdash-cms/core +# Return to app and copy source +WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . +# Replace emdash with built source using pnpm overrides +RUN rm -rf node_modules/emdash && cp -r /app/emdash-source/packages/core/dist node_modules/emdash + RUN pnpm build && mkdir -p storage/uploads FROM deps AS runner