Merge pull request #28 from techops-services/fix/replace-config-no-merge
fix: replace config from repo instead of merging
This commit is contained in:
commit
955eded534
@ -45,9 +45,6 @@ RUN npm install --legacy-peer-deps esbuild && \
|
|||||||
# Stage 3: Production image
|
# Stage 3: Production image
|
||||||
FROM node:22-bookworm-slim
|
FROM node:22-bookworm-slim
|
||||||
|
|
||||||
# Install jq for config merging
|
|
||||||
RUN apt-get update && apt-get install -y jq && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy built clawdbot
|
# Copy built clawdbot
|
||||||
@ -70,14 +67,8 @@ RUN rm -rf node_modules && npm install --omit=dev
|
|||||||
# Create entrypoint script
|
# Create entrypoint script
|
||||||
RUN echo '#!/bin/sh\n\
|
RUN echo '#!/bin/sh\n\
|
||||||
mkdir -p /root/.clawdbot\n\
|
mkdir -p /root/.clawdbot\n\
|
||||||
if [ -f "/root/.clawdbot/clawdbot.json" ]; then\n\
|
echo "Deploying config from repo..."\n\
|
||||||
echo "Merging repo config with existing config..."\n\
|
|
||||||
jq -s ".[0] * .[1]" /root/.clawdbot/clawdbot.json /app/clawdbot.default.json > /tmp/merged.json\n\
|
|
||||||
mv /tmp/merged.json /root/.clawdbot/clawdbot.json\n\
|
|
||||||
else\n\
|
|
||||||
echo "Creating config from repo..."\n\
|
|
||||||
cp /app/clawdbot.default.json /root/.clawdbot/clawdbot.json\n\
|
cp /app/clawdbot.default.json /root/.clawdbot/clawdbot.json\n\
|
||||||
fi\n\
|
|
||||||
echo "Installing plugins..."\n\
|
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\
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user