From a359874a42add6b0f4f2f4844ba6e19268bdc05f Mon Sep 17 00:00:00 2001 From: Denozordec Date: Tue, 12 May 2026 15:08:11 +0700 Subject: [PATCH] chore: enhance Dockerfile for backend to rebuild better-sqlite3 - Updated the backend Dockerfile to include a rebuild step for better-sqlite3 after npm ci, improving compatibility and performance. - Removed redundant package installation commands to streamline the Docker build process. --- backend/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index ab991ad..6e9b22d 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -5,11 +5,11 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends python3 make g++ \ && rm -rf /var/lib/apt/lists/* WORKDIR /app -ENV npm_config_ignore_scripts=true COPY package.json package-lock.json ./ COPY packages/contracts/package.json packages/contracts/ COPY backend/package.json backend/ -RUN npm ci --workspace=@mmapp/contracts --workspace=mikrotik-manager-backend --include-workspace-root --ignore-scripts +RUN npm ci --workspace=@mmapp/contracts --workspace=mikrotik-manager-backend --include-workspace-root --ignore-scripts \ + && npm rebuild better-sqlite3 FROM deps AS build COPY packages/contracts packages/contracts @@ -19,9 +19,6 @@ RUN npm run build -w @mmapp/contracts \ && npm prune --omit=dev FROM node:22-bookworm-slim AS runner -RUN apt-get update \ - && apt-get install -y --no-install-recommends python3 make g++ \ - && rm -rf /var/lib/apt/lists/* WORKDIR /app ENV NODE_ENV=production ENV PORT=8000