fix: bundle discord plugin for auto-enable
This commit is contained in:
parent
955eded534
commit
80333447f2
@ -38,6 +38,16 @@ FROM node:22-slim AS memory-core-builder
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY extensions/memory-core ./
|
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)
|
# Add esbuild and build (skip peer deps to avoid unreleased clawdbot version)
|
||||||
RUN npm install --legacy-peer-deps esbuild && \
|
RUN npm install --legacy-peer-deps esbuild && \
|
||||||
npx esbuild index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:clawdbot --external:clawdbot/*
|
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 the pre-built extensions to staging (PVC will mount over /root/.clawdbot)
|
||||||
COPY --from=checkins-builder /build /app/bundled-plugins/checkins
|
COPY --from=checkins-builder /build /app/bundled-plugins/checkins
|
||||||
COPY --from=memory-core-builder /build /app/bundled-plugins/memory-core
|
COPY --from=memory-core-builder /build /app/bundled-plugins/memory-core
|
||||||
|
COPY --from=discord-builder /build /app/bundled-plugins/discord
|
||||||
|
|
||||||
# Copy default config
|
# Copy default config
|
||||||
COPY deploy/prod/clawdbot.json /app/clawdbot.default.json
|
COPY deploy/prod/clawdbot.json /app/clawdbot.default.json
|
||||||
@ -73,6 +84,7 @@ echo "Installing plugins..."\n\
|
|||||||
mkdir -p /root/.clawdbot/extensions\n\
|
mkdir -p /root/.clawdbot/extensions\n\
|
||||||
cp -r /app/bundled-plugins/checkins /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/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\
|
exec node /app/dist/entry.js gateway run\n\
|
||||||
' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh
|
' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@ -76,6 +76,9 @@
|
|||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"entries": {
|
"entries": {
|
||||||
|
"discord": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
"checkins": {
|
"checkins": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user