Merge pull request #29 from techops-services/fix/bundle-discord-plugin

fix: bundle discord plugin for auto-enable
This commit is contained in:
Simon KP 2026-01-26 21:03:06 +11:00 committed by GitHub
commit f1820b9cb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -76,6 +76,9 @@
},
"plugins": {
"entries": {
"discord": {
"enabled": true
},
"checkins": {
"enabled": true
},