diff --git a/Dockerfile b/Dockerfile index 39480d1..7358148 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ # Stage 1: Build the React Application -FROM node:20 AS builder +FROM node:20-bookworm AS builder WORKDIR /app -# Copy ONLY package.json. -# We intentionally IGNORE package-lock.json to prevent architecture mismatches -# (e.g., trying to install macOS binaries for esbuild on Linux). +# Copy ONLY package.json COPY package.json ./ -# Install dependencies from scratch for the container's architecture -RUN npm install +# Install dependencies +# --legacy-peer-deps: Ignores peer dependency conflicts +# --no-audit: Skips vulnerability audit (faster, less noise) +# --no-fund: Hides funding messages +RUN npm install --legacy-peer-deps --no-audit --no-fund # Copy the rest of the application source code COPY . . @@ -18,7 +19,7 @@ COPY . . RUN npm run build # Stage 2: Setup the Production Server -FROM node:20 +FROM node:20-bookworm-slim WORKDIR /app @@ -26,7 +27,7 @@ WORKDIR /app COPY package.json ./ # Install ONLY production dependencies -RUN npm install --omit=dev +RUN npm install --omit=dev --legacy-peer-deps --no-audit --no-fund # Copy the built frontend assets from the 'builder' stage COPY --from=builder /app/dist ./dist @@ -42,4 +43,4 @@ ENV PORT=3000 EXPOSE 3000 # Start the Node.js server -CMD ["npm", "start"] +CMD ["npm", "start"] \ No newline at end of file diff --git a/package.json b/package.json index 4bb01c0..bbcce45 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "type": "module", "dependencies": { "@google/genai": "^0.1.0", - "lucide-react": "^0.294.0", + "lucide-react": "^0.344.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "express": "^4.18.2", - "mysql2": "^3.9.1", - "pg": "^8.11.3", - "dotenv": "^16.4.1", + "express": "^4.19.2", + "mysql2": "^3.9.7", + "pg": "^8.11.5", + "dotenv": "^16.4.5", "cors": "^2.8.5" }, "scripts": { @@ -20,13 +20,13 @@ "build": "vite build" }, "devDependencies": { - "@types/react": "^18.2.43", - "@types/react-dom": "^18.2.17", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", - "autoprefixer": "^10.4.16", - "postcss": "^8.4.32", - "tailwindcss": "^3.4.0", - "typescript": "^5.3.3", - "vite": "^5.0.10" + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.3", + "typescript": "^5.4.5", + "vite": "^5.2.11" } } \ No newline at end of file