mirror of
https://github.com/temetro/temetro.git
synced 2026-09-04 14:55:28 +00:00
backend: skip native build scripts in Docker build stage
The build stage ran `npm ci`, which tried to compile better-sqlite3 — a dev-only transitive dependency of @better-auth/cli — and failed in Alpine for lack of Python/node-gyp. The build step is just `tsc` (no native binaries needed) and better-sqlite3 is never used at runtime (the prod stage omits dev deps), so install dev deps with --ignore-scripts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -2,7 +2,11 @@
|
|||||||
FROM node:22-alpine AS build
|
FROM node:22-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
# --ignore-scripts skips native postinstall builds (e.g. better-sqlite3, a
|
||||||
|
# dev-only dependency of @better-auth/cli that needs Python/node-gyp). The build
|
||||||
|
# step is just `tsc`, which needs no compiled binaries, and better-sqlite3 is
|
||||||
|
# never used at runtime (the prod stage omits dev deps).
|
||||||
|
RUN npm ci --ignore-scripts
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user