From 80333447f26c8ef749c62f43994f1d75a248ae17 Mon Sep 17 00:00:00 2001 From: Simon KP Date: Mon, 26 Jan 2026 21:02:24 +1100 Subject: [PATCH] fix: bundle discord plugin for auto-enable --- Dockerfile.prod | 12 ++++++++++++ deploy/prod/clawdbot.json | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Dockerfile.prod b/Dockerfile.prod index d537a01f6..0f855ae0e 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -38,6 +38,16 @@ FROM node:22-slim AS memory-core-builder WORKDIR /build COPY extensions/memory-core ./ +# Add esbuild and build (skip peer deps to avoid unreleased clawdbot version) +RUN npm install --legacy-peer-deps esbuild && \ + npx esbuild index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:clawdbot --external:clawdbot/* + +# Stage 2c: Build discord extension +FROM node:22-slim AS discord-builder + +WORKDIR /build +COPY extensions/discord ./ + # Add esbuild and build (skip peer deps to avoid unreleased clawdbot version) RUN npm install --legacy-peer-deps esbuild && \ npx esbuild index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:clawdbot --external:clawdbot/* @@ -56,6 +66,7 @@ COPY --from=clawdbot-builder /app/package.json ./package.json # Copy the pre-built extensions to staging (PVC will mount over /root/.clawdbot) COPY --from=checkins-builder /build /app/bundled-plugins/checkins COPY --from=memory-core-builder /build /app/bundled-plugins/memory-core +COPY --from=discord-builder /build /app/bundled-plugins/discord # Copy default config COPY deploy/prod/clawdbot.json /app/clawdbot.default.json @@ -73,6 +84,7 @@ echo "Installing plugins..."\n\ mkdir -p /root/.clawdbot/extensions\n\ cp -r /app/bundled-plugins/checkins /root/.clawdbot/extensions/\n\ cp -r /app/bundled-plugins/memory-core /root/.clawdbot/extensions/\n\ +cp -r /app/bundled-plugins/discord /root/.clawdbot/extensions/\n\ exec node /app/dist/entry.js gateway run\n\ ' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh diff --git a/deploy/prod/clawdbot.json b/deploy/prod/clawdbot.json index 80334f360..50f957b90 100644 --- a/deploy/prod/clawdbot.json +++ b/deploy/prod/clawdbot.json @@ -76,6 +76,9 @@ }, "plugins": { "entries": { + "discord": { + "enabled": true + }, "checkins": { "enabled": true },