deploy-stack 0.9.10 → 0.9.11
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
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
FROM node:22-alpine AS builder
|
|
3
3
|
WORKDIR /app
|
|
4
4
|
|
|
5
|
+
# Install native build tools required to compile C++ Node modules (like better-sqlite3)
|
|
6
|
+
RUN apk update && \
|
|
7
|
+
apk add --no-cache python3 make g++ sqlite-dev
|
|
8
|
+
|
|
5
9
|
COPY package.json package-lock.json* ./
|
|
6
10
|
RUN npm ci
|
|
7
11
|
|
|
12
|
+
# Explicitly install better-sqlite3 to satisfy Nuxt 4 / Nitro dynamic requirements
|
|
13
|
+
RUN npm install better-sqlite3
|
|
14
|
+
|
|
8
15
|
COPY . .
|
|
9
16
|
RUN npm run build
|
|
10
17
|
|
|
@@ -16,6 +23,17 @@ ENV NODE_ENV=production
|
|
|
16
23
|
ENV PORT={{PORT}}
|
|
17
24
|
ENV HOSTNAME="0.0.0.0"
|
|
18
25
|
|
|
26
|
+
# 1. Upgrade Alpine OS packages to clear OpenSSL/crypto CVEs
|
|
27
|
+
# 2. Vaporize Node package managers (npm, yarn, corepack) to clear ghost CVEs
|
|
28
|
+
RUN apk update && apk upgrade --no-cache && \
|
|
29
|
+
rm -rf /usr/local/lib/node_modules \
|
|
30
|
+
/usr/local/bin/npm \
|
|
31
|
+
/usr/local/bin/npx \
|
|
32
|
+
/usr/local/bin/yarn \
|
|
33
|
+
/usr/local/bin/yarnpkg \
|
|
34
|
+
/usr/local/bin/corepack \
|
|
35
|
+
/opt/yarn-*
|
|
36
|
+
|
|
19
37
|
# Create an unprivileged user and group
|
|
20
38
|
RUN addgroup -g 1001 -S nodejs && \
|
|
21
39
|
adduser -S nuxtjs -u 1001 -G nodejs
|