@cybermem/mcp 0.13.3 → 0.13.4
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 +15 -18
- package/package.json +1 -1
package/Dockerfile
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Base stage
|
|
2
|
+
FROM node:20-alpine AS base
|
|
3
3
|
WORKDIR /app
|
|
4
|
-
# Install build dependencies for native modules (better-sqlite3)
|
|
5
4
|
RUN apk add --no-cache python3 make g++
|
|
6
5
|
|
|
7
|
-
#
|
|
6
|
+
# Build stage
|
|
7
|
+
FROM base AS builder
|
|
8
8
|
COPY package.json ./
|
|
9
|
-
# Install ALL dependencies (including devDeps for build if TS)
|
|
10
9
|
RUN npm install
|
|
11
|
-
|
|
12
|
-
# Copy source
|
|
13
10
|
COPY . .
|
|
14
|
-
|
|
15
|
-
# Build TypeScript
|
|
16
11
|
RUN npm run build
|
|
17
|
-
|
|
18
|
-
# Prune dev dependencies
|
|
19
12
|
RUN npm prune --production
|
|
20
13
|
|
|
14
|
+
# Native stage for sqlite3 bindings
|
|
15
|
+
FROM node:20-alpine AS native-builder
|
|
16
|
+
RUN apk update && apk add --no-cache python3 python3-dev make g++
|
|
17
|
+
WORKDIR /native
|
|
18
|
+
RUN npm init -y && npm install sqlite3@5.1.7 sqlite@5.1.1
|
|
21
19
|
|
|
20
|
+
# Runtime stage
|
|
22
21
|
FROM node:20-alpine AS runner
|
|
23
|
-
|
|
24
|
-
WORKDIR /app
|
|
25
22
|
RUN apk add --no-cache libc6-compat
|
|
26
|
-
|
|
27
|
-
# We copy node_modules from builder so native addons should work if arc matches.
|
|
28
|
-
# For cross-platform (building amd64 on arm64 or vice versa), we might need QEMU or specific handling.
|
|
29
|
-
# GitHub Actions runner is likely amd64, RPi is arm64.
|
|
30
|
-
# We rely on docker buildx (multi-arch) in CI.
|
|
23
|
+
WORKDIR /app
|
|
31
24
|
|
|
32
25
|
# Copy built artifacts and deps
|
|
33
26
|
COPY --from=builder /app/dist ./dist
|
|
34
27
|
COPY --from=builder /app/node_modules ./node_modules
|
|
35
28
|
COPY --from=builder /app/package.json ./package.json
|
|
36
29
|
|
|
30
|
+
# Copy compiled native modules (sqlite3 and sqlite)
|
|
31
|
+
COPY --from=native-builder /native/node_modules/sqlite3 ./node_modules/sqlite3
|
|
32
|
+
COPY --from=native-builder /native/node_modules/sqlite ./node_modules/sqlite
|
|
33
|
+
|
|
37
34
|
# Environment defaults
|
|
38
35
|
ENV NODE_ENV=production
|
|
39
36
|
ENV PORT=8080
|