@smi-digital/create-smi-app 2.11.1 → 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
|
@@ -3,17 +3,16 @@
|
|
|
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-
|
|
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
|
-
# Use `npm ci` for a deterministic install straight from the lockfile. This also
|
|
15
|
-
# installs sharp's pinned prebuilt musl binary (@img/sharp-linuxmusl-x64), which
|
|
16
|
-
# `npm install` skips when the lockfile was generated on another OS (npm/cli#4828).
|
|
17
16
|
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci
|
|
18
17
|
ENV PATH=/opt/node_modules/.bin:$PATH
|
|
19
18
|
|
|
@@ -22,15 +21,12 @@ COPY . .
|
|
|
22
21
|
RUN npm run build
|
|
23
22
|
|
|
24
23
|
# Stage 2: Production
|
|
25
|
-
FROM node:24-
|
|
26
|
-
RUN apk update && apk add --no-cache vips-dev > /dev/null 2>&1
|
|
24
|
+
FROM node:24-slim
|
|
27
25
|
ARG NODE_ENV=production
|
|
28
26
|
ENV NODE_ENV=${NODE_ENV}
|
|
29
27
|
|
|
30
28
|
WORKDIR /opt/
|
|
31
29
|
COPY package.json package-lock.json* ./
|
|
32
|
-
RUN npm install -g node-gyp
|
|
33
|
-
# Deterministic prod install from the lockfile (see builder stage note re: sharp).
|
|
34
30
|
RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev
|
|
35
31
|
ENV PATH=/opt/node_modules/.bin:$PATH
|
|
36
32
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# ========================================================
|
|
8
8
|
|
|
9
9
|
# Stage 1: Build
|
|
10
|
-
FROM node:24-
|
|
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-
|
|
29
|
+
FROM node:24-slim
|
|
30
30
|
WORKDIR /app
|
|
31
31
|
|
|
32
32
|
# Copy the built SSR server bundle and its dependencies
|