mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
🐛 fix(matrix-bots): add pnpm rebuild for native crypto module
The @matrix-org/matrix-sdk-crypto-nodejs package needs a rebuild step after install to properly select the platform-specific prebuilt binary. Without this, the module fails to find the correct binding at runtime. Adds `pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs || true` after both the dev and prod install steps in all matrix bot Dockerfiles. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7d7e31e486
commit
38101bca00
10 changed files with 60 additions and 0 deletions
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ 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
|
||||
|
|
@ -50,6 +53,9 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue