🐛 fix(matrix-bots): restore --ignore-scripts to skip root postinstall

The root package.json has postinstall hooks (generate-env, build:packages,
husky) that fail in Docker context. --ignore-scripts prevents these from
running while still allowing the build to complete.

Using node:20-slim (glibc) should handle matrix-sdk crypto modules via
prebuilt binaries without needing install scripts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-01 14:47:04 +01:00
parent a384bed181
commit 6c937b6c80
10 changed files with 22 additions and 22 deletions

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-calendar-bot ./services/matrix-calendar-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-calendar-bot/dist ./services/matrix-cal
COPY --from=builder /app/services/matrix-calendar-bot/package.json ./services/matrix-calendar-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-clock-bot ./services/matrix-clock-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-clock-bot/dist ./services/matrix-clock-
COPY --from=builder /app/services/matrix-clock-bot/package.json ./services/matrix-clock-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -16,8 +16,8 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
# Copy this bot
COPY services/matrix-mana-bot ./services/matrix-mana-bot
# Install all dependencies (allow scripts for native modules)
RUN pnpm install --frozen-lockfile
# Install all dependencies (--ignore-scripts to skip root postinstall hooks)
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -47,8 +47,8 @@ COPY --from=builder /app/packages/matrix-bot-common/package.json ./packages/matr
COPY --from=builder /app/services/matrix-mana-bot/dist ./services/matrix-mana-bot/dist
COPY --from=builder /app/services/matrix-mana-bot/package.json ./services/matrix-mana-bot/
# Install production dependencies (allow scripts for native modules)
RUN pnpm install --frozen-lockfile --prod
# Install production dependencies only (--ignore-scripts to skip root postinstall hooks)
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-nutriphi-bot ./services/matrix-nutriphi-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-nutriphi-bot/dist ./services/matrix-nut
COPY --from=builder /app/services/matrix-nutriphi-bot/package.json ./services/matrix-nutriphi-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-ollama-bot ./services/matrix-ollama-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-ollama-bot/dist ./services/matrix-ollam
COPY --from=builder /app/services/matrix-ollama-bot/package.json ./services/matrix-ollama-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-project-doc-bot ./services/matrix-project-doc-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-project-doc-bot/dist ./services/matrix-
COPY --from=builder /app/services/matrix-project-doc-bot/package.json ./services/matrix-project-doc-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-stats-bot ./services/matrix-stats-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-stats-bot/dist ./services/matrix-stats-
COPY --from=builder /app/services/matrix-stats-bot/package.json ./services/matrix-stats-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-todo-bot ./services/matrix-todo-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-todo-bot/dist ./services/matrix-todo-bo
COPY --from=builder /app/services/matrix-todo-bot/package.json ./services/matrix-todo-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-tts-bot ./services/matrix-tts-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-tts-bot/dist ./services/matrix-tts-bot/
COPY --from=builder /app/services/matrix-tts-bot/package.json ./services/matrix-tts-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data

View file

@ -17,7 +17,7 @@ COPY packages/matrix-bot-common ./packages/matrix-bot-common
COPY services/matrix-zitare-bot ./services/matrix-zitare-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
@ -48,7 +48,7 @@ COPY --from=builder /app/services/matrix-zitare-bot/dist ./services/matrix-zitar
COPY --from=builder /app/services/matrix-zitare-bot/package.json ./services/matrix-zitare-bot/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Create data directory
RUN mkdir -p /app/data