fix: bundle memory-core plugin alongside checkins
This commit is contained in:
parent
ca000bc7fb
commit
e77e36bbaa
@ -23,7 +23,7 @@ RUN pnpm build
|
||||
# (Also avoids extensions/memory-core requiring unreleased clawdbot version)
|
||||
|
||||
# Stage 2: Build checkins extension
|
||||
FROM node:22-slim AS extension-builder
|
||||
FROM node:22-slim AS checkins-builder
|
||||
|
||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -32,6 +32,16 @@ COPY extensions/checkins ./
|
||||
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Stage 2b: Build memory-core extension
|
||||
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 3: Production image
|
||||
FROM node:22-bookworm-slim
|
||||
|
||||
@ -46,13 +56,14 @@ COPY --from=clawdbot-builder /app/node_modules ./node_modules
|
||||
COPY --from=clawdbot-builder /app/package.json ./package.json
|
||||
# UI not built - gateway-only deploy
|
||||
|
||||
# Copy the pre-built extension to staging (PVC will mount over /root/.clawdbot)
|
||||
COPY --from=extension-builder /build /app/bundled-plugins/checkins
|
||||
# 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 default config
|
||||
COPY deploy/prod/clawdbot.json /app/clawdbot.default.json
|
||||
|
||||
# Install production dependencies for extension
|
||||
# Install production dependencies for extensions
|
||||
WORKDIR /app/bundled-plugins/checkins
|
||||
RUN rm -rf node_modules && npm install --omit=dev
|
||||
|
||||
@ -67,9 +78,10 @@ else\n\
|
||||
echo "Creating config from repo..."\n\
|
||||
cp /app/clawdbot.default.json /root/.clawdbot/clawdbot.json\n\
|
||||
fi\n\
|
||||
echo "Installing checkins plugin..."\n\
|
||||
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\
|
||||
exec node /app/dist/entry.js gateway run\n\
|
||||
' > /app/entrypoint.sh && chmod +x /app/entrypoint.sh
|
||||
|
||||
|
||||
@ -78,8 +78,13 @@
|
||||
"entries": {
|
||||
"checkins": {
|
||||
"enabled": true
|
||||
},
|
||||
"memory-core": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"slots": {}
|
||||
"slots": {
|
||||
"memory": "memory-core"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user