@cybermem/dashboard 0.9.4 → 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.
- package/Dockerfile +10 -6
- 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
|
|
37
|
+
RUN apk add --no-cache libc6-compat
|
|
32
38
|
WORKDIR /app
|
|
33
39
|
|
|
34
40
|
ENV NODE_ENV=production
|
|
@@ -39,11 +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
|
-
# Copy
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# Fix sqlite3 bindings by installing it explicitly in the production image
|
|
46
|
-
RUN npm install sqlite3@5.1.7 --no-save
|
|
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
|
|
47
51
|
|
|
48
52
|
# Expose port
|
|
49
53
|
EXPOSE 3000
|