fix: restore native arm64 architecture support in Dockerfile and improve API error handling

This commit is contained in:
2026-08-10 07:32:02 +00:00
parent 6164e4ea9f
commit 859af13364
6 changed files with 574 additions and 313 deletions
+4 -4
View File
@@ -11,8 +11,8 @@ RUN npm ci
COPY . .
RUN VITE_API_URL=$VITE_API_URL npm run build
# Stage 2: Production environment with Node.js, Nginx, and MongoDB Community Edition
FROM node:20-bookworm-slim
# Stage 2: Production environment with Node.js, Nginx, and MongoDB Community Edition (ARM64 & AMD64 native support via Ubuntu 22.04 Jammy)
FROM node:20-jammy
WORKDIR /app
@@ -27,10 +27,10 @@ RUN apt-get update && apt-get install -y \
procps \
&& rm -rf /var/lib/apt/lists/*
# Add MongoDB official GPG key and repository (MongoDB 8.0)
# Add MongoDB official GPG key and repository (MongoDB 8.0 for Ubuntu 22.04 Jammy - supports arm64 and amd64 natively)
RUN curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg \
&& echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | \
&& echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | \
tee /etc/apt/sources.list.d/mongodb-org-8.0.list
# Install MongoDB Community Edition