This commit is contained in:
jarek
2026-04-03 13:53:12 +02:00
parent 81c03b5dc5
commit 50bc746660
+6 -4
View File
@@ -84,11 +84,13 @@ RUN npm ci --ignore-scripts \
COPY . .
RUN npm run build
# Production dependencies only (rebuilds native addons like better-sqlite3)
RUN rm -rf node_modules \
# Production dependencies only
# Preserve better-sqlite3 native addon (no prebuilds exist for Node 24 ABI 137)
RUN cp -r node_modules/better-sqlite3/build /tmp/better-sqlite3-build \
&& rm -rf node_modules \
&& npm ci --omit=dev --ignore-scripts \
&& npm rebuild better-sqlite3 argon2 \
&& rm -rf node_modules/@types
&& cp -r /tmp/better-sqlite3-build node_modules/better-sqlite3/build \
&& rm -rf node_modules/@types /tmp/better-sqlite3-build
# Build Go collector
FROM --platform=$BUILDPLATFORM golang:1.25.8 AS go-builder