@cybermem/dashboard 0.9.6 → 0.9.8

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.
Files changed (2) hide show
  1. package/Dockerfile +10 -5
  2. package/package.json +1 -1
package/Dockerfile CHANGED
@@ -26,9 +26,15 @@ RUN --mount=type=cache,target=/root/.pnpm-store \
26
26
  --mount=type=cache,target=/app/.next/cache \
27
27
  pnpm build
28
28
 
29
+ # Native stage for sqlite3 bindings
30
+ FROM node:20-alpine AS native-builder
31
+ RUN apk add --no-cache python3 make g++
32
+ WORKDIR /native
33
+ RUN npm init -y && npm install sqlite3@5.1.7
34
+
29
35
  # Production stage
30
36
  FROM node:20-alpine AS production
31
- RUN apk add --no-cache libc6-compat python3 make g++
37
+ RUN apk add --no-cache libc6-compat
32
38
  WORKDIR /app
33
39
 
34
40
  ENV NODE_ENV=production
@@ -39,10 +45,9 @@ COPY --from=builder /app/public ./public
39
45
  COPY --from=builder /app/.next/standalone ./
40
46
  COPY --from=builder /app/.next/static ./.next/static
41
47
 
42
- # Fix sqlite3 bindings by installing it explicitly in the production image
43
- # We install it in the root to ensure it's available and then let Next.js find it
44
- RUN npm init -y && npm install sqlite3@5.1.7 --no-save && \
45
- apk del python3 make g++
48
+ # Copy compiled native modules (sqlite3 specifically)
49
+ # standalone contains its own node_modules, we add ours there
50
+ COPY --from=native-builder /native/node_modules/sqlite3 ./node_modules/sqlite3
46
51
 
47
52
  # Expose port
48
53
  EXPOSE 3000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cybermem/dashboard",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "CyberMem Monitoring Dashboard",
5
5
  "homepage": "https://cybermem.dev",
6
6
  "repository": {