File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2
+ # Stage 1: Build the application
3
+ FROM node:20-alpine AS builder
4
+
5
+ # Set working directory
6
+ WORKDIR /app
7
+
8
+ # Copy source files
9
+ COPY package.json package-lock.json tsconfig.json ./
10
+ COPY src ./src
11
+
12
+ # Install dependencies and build the project
13
+ RUN npm install --ignore-scripts && npm run build
14
+
15
+ # Stage 2: Create the production image
16
+ FROM node:20-alpine
17
+
18
+ # Set working directory
19
+ WORKDIR /app
20
+
21
+ # Copy built files from the builder stage
22
+ COPY --from=builder /app/build /app/build
23
+ COPY --from=builder /app/package.json /app/package.json
24
+ COPY --from=builder /app/package-lock.json /app/package-lock.json
25
+
26
+ # Install only production dependencies
27
+ RUN npm ci --omit=dev
28
+
29
+ # Environment variables
30
+ ENV NS_API_KEY=your_api_key_here
31
+
32
+ # Define the command to run the application
33
+ ENTRYPOINT ["node" , "build/index.js" ]
You can’t perform that action at this time.
0 commit comments