@smi-digital/create-smi-app 2.11.2 → 2.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smi-digital/create-smi-app",
3
- "version": "2.11.2",
3
+ "version": "2.11.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -3,21 +3,17 @@
3
3
  # Place this in your /backend folder
4
4
  # ========================================================
5
5
 
6
+ # Debian (glibc) base rather than Alpine (musl): sharp and better-sqlite3 ship
7
+ # glibc prebuilt binaries that match a lockfile generated on a typical dev
8
+ # machine, so `npm ci` installs cleanly — no source builds, no system libvips,
9
+ # no build toolchain. (sharp recommends glibc over musl.)
10
+
6
11
  # Stage 1: Builder
7
- FROM node:24-alpine AS builder
8
- # Installing libvips-dev for sharp Compatibility
9
- RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev curl > /dev/null 2>&1
12
+ FROM node:24-slim AS builder
10
13
 
11
14
  WORKDIR /opt/
12
15
  COPY package.json package-lock.json* ./
13
- RUN npm install -g node-gyp
14
- # `npm ci` for a deterministic install from the lockfile. The --os/--libc/--cpu
15
- # flags force npm to install sharp's prebuilt musl binary (@img/sharp-linuxmusl-x64,
16
- # already pinned in the lockfile). Without them, npm skips it when the lockfile was
17
- # generated on another OS and sharp falls back to a failing source build. This is
18
- # sharp's documented workaround for npm bug #4828. Flags target linux x64 deploys;
19
- # change --cpu=arm64 for arm builds.
20
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --os=linux --libc=musl --cpu=x64
16
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci
21
17
  ENV PATH=/opt/node_modules/.bin:$PATH
22
18
 
23
19
  WORKDIR /opt/app
@@ -25,16 +21,13 @@ COPY . .
25
21
  RUN npm run build
26
22
 
27
23
  # Stage 2: Production
28
- FROM node:24-alpine
29
- RUN apk update && apk add --no-cache vips-dev > /dev/null 2>&1
24
+ FROM node:24-slim
30
25
  ARG NODE_ENV=production
31
26
  ENV NODE_ENV=${NODE_ENV}
32
27
 
33
28
  WORKDIR /opt/
34
29
  COPY package.json package-lock.json* ./
35
- RUN npm install -g node-gyp
36
- # Deterministic prod install from the lockfile; same sharp/musl flags as builder.
37
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev --os=linux --libc=musl --cpu=x64
30
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev
38
31
  ENV PATH=/opt/node_modules/.bin:$PATH
39
32
 
40
33
  WORKDIR /opt/app
@@ -7,7 +7,7 @@
7
7
  # ========================================================
8
8
 
9
9
  # Stage 1: Build
10
- FROM node:24-alpine AS builder
10
+ FROM node:24-slim AS builder
11
11
  WORKDIR /app
12
12
  COPY package.json package-lock.json ./
13
13
  RUN npm ci
@@ -26,7 +26,7 @@ ENV PUBLIC_GA_ID=${PUBLIC_GA_ID}
26
26
  RUN npm run build
27
27
 
28
28
  # Stage 2: Serve the SSR server bundle
29
- FROM node:24-alpine
29
+ FROM node:24-slim
30
30
  WORKDIR /app
31
31
 
32
32
  # Copy the built SSR server bundle and its dependencies