🐛 fix(matrix-bots): disable E2EE crypto module via pnpm override

Add root-level pnpm override to replace @matrix-org/matrix-sdk-crypto-nodejs
with empty-npm-package. This disables E2EE support but allows matrix bots
to run without native module compilation issues.

The bots don't need E2EE since Matrix Synapse handles encryption at
the server level for our use case.

Also removes the explicit pnpm add commands from Dockerfiles since the
override handles the module replacement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-01 15:08:28 +01:00
parent 3dba7d8695
commit a8521d7acd
12 changed files with 465 additions and 726 deletions

View file

@ -288,7 +288,8 @@
],
"overrides": {
"cpu-features": "npm:empty-npm-package@1.0.0",
"ssh2": "npm:empty-npm-package@1.0.0"
"ssh2": "npm:empty-npm-package@1.0.0",
"@matrix-org/matrix-sdk-crypto-nodejs": "npm:empty-npm-package@1.0.0"
}
}
}

1128
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -19,9 +19,6 @@ COPY services/matrix-calendar-bot ./services/matrix-calendar-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-calendar-bot/package.json ./services/ma
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-clock-bot ./services/matrix-clock-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-clock-bot/package.json ./services/matri
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-mana-bot ./services/matrix-mana-bot
# Install all dependencies (--ignore-scripts to skip root postinstall hooks)
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-mana-bot/package.json ./services/matrix
# Install production dependencies only (--ignore-scripts to skip root postinstall hooks)
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-nutriphi-bot ./services/matrix-nutriphi-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-nutriphi-bot/package.json ./services/ma
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-ollama-bot ./services/matrix-ollama-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-ollama-bot/package.json ./services/matr
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-project-doc-bot ./services/matrix-project-doc-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-project-doc-bot/package.json ./services
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-stats-bot ./services/matrix-stats-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-stats-bot/package.json ./services/matri
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-todo-bot ./services/matrix-todo-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-todo-bot/package.json ./services/matrix
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-tts-bot ./services/matrix-tts-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-tts-bot/package.json ./services/matrix-
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data

View file

@ -19,9 +19,6 @@ COPY services/matrix-zitare-bot ./services/matrix-zitare-bot
# Install all dependencies
RUN pnpm install --frozen-lockfile --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Build shared packages first (in dependency order)
RUN pnpm --filter @manacore/bot-services build
RUN pnpm --filter @manacore/matrix-bot-common build
@ -53,9 +50,6 @@ COPY --from=builder /app/services/matrix-zitare-bot/package.json ./services/matr
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Rebuild native modules to ensure platform-specific binaries are selected
RUN pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true
# Create data directory
RUN mkdir -p /app/data