File tree 1 file changed +24
-4
lines changed
1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change 1
- FROM node:22-alpine
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2
+ # ----- Build Stage -----
3
+ FROM node:lts-alpine AS builder
4
+ WORKDIR /app
5
+
6
+ # Copy package and configuration
7
+ COPY ../package.json ../package-lock.json ../tsconfig.json ../tsconfig.build.json ./
8
+
9
+ # Copy source code
10
+ COPY ../src ./src
2
11
12
+ # Install dependencies and build
13
+ RUN npm ci && npm run build
14
+
15
+ # ----- Production Stage -----
16
+ FROM node:lts-alpine
3
17
WORKDIR /app
4
18
5
- COPY ../ .
19
+ # Copy built artifacts
20
+ COPY --from=builder /app/dist ./dist
21
+
22
+ # Copy package.json for production install
23
+ COPY ../package.json package-lock.json ./
6
24
7
- RUN npm ci
25
+ # Install only production dependencies
26
+ RUN npm ci --production --ignore-scripts
8
27
9
- RUN npm run build
28
+ # Expose no ports (stdio only)
10
29
30
+ # Default command
11
31
CMD ["node" , "dist/index.js" ]
You can’t perform that action at this time.
0 commit comments