fix: Resolve bcrypt architecture and duplicate resource creation issues
Backend fixes: - Fix bcrypt exec format error for ARM64 architecture - Add architecture detection for MinIO client download - Install build tools and rebuild bcrypt from source - Add postinstall script to automatically rebuild bcrypt - Rebuild bcrypt after copying files to ensure correct binary Frontend fixes: - Handle duplicate resource creation in QuickStartWizard - Add error handling for "already exists" scenarios - Prevent multiple executions with isCreating flag - Allow wizard to complete even if resources already exist These changes fix: 1. Backend crash on ARM64 due to bcrypt binary mismatch 2. 500 errors when resources already exist in QuickStartWizard 3. Race conditions when clicking Complete button multiple times 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install MinIO client
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && \
|
||||
# Install MinIO client (detect architecture)
|
||||
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g') && \
|
||||
wget https://dl.min.io/client/mc/release/linux-${ARCH}/mc && \
|
||||
chmod +x mc && \
|
||||
mv mc /usr/local/bin/
|
||||
|
||||
@@ -11,12 +12,19 @@ WORKDIR /app
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install production dependencies
|
||||
# Install build tools for native dependencies (keep them)
|
||||
RUN apk add --no-cache python3 make g++ \
|
||||
&& rm -rf /app/node_modules
|
||||
|
||||
# Install production dependencies (will trigger postinstall)
|
||||
RUN npm ci --only=production
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
# Rebuild bcrypt after copying files
|
||||
RUN npm rebuild bcrypt --build-from-source
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -g 1001 -S nodejs && \
|
||||
adduser -S nodejs -u 1001
|
||||
|
||||
Reference in New Issue
Block a user