Skip to content

Commit 4813a6b

Browse files
committed
Add Dockerfile
1 parent c2c3f87 commit 4813a6b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Use the Node.js image with the required version for the project
3+
FROM node:18-alpine AS builder
4+
5+
# Set working directory
6+
WORKDIR /app
7+
8+
# Copy package files to the working directory
9+
COPY package.json package-lock.json ./
10+
11+
# Install dependencies
12+
RUN npm install
13+
14+
# Copy all files to the working directory
15+
COPY . .
16+
17+
# Build the TypeScript files
18+
RUN npm run build
19+
20+
# Create the final release image
21+
FROM node:18-alpine AS release
22+
23+
# Set working directory
24+
WORKDIR /app
25+
26+
# Copy built files and necessary package information
27+
COPY --from=builder /app/build /app/build
28+
COPY --from=builder /app/package.json /app/package-lock.json /app/node_modules ./
29+
30+
# Environment configuration for runtime (configured externally)
31+
ENV REST_BASE_URL=""
32+
ENV AUTH_BASIC_USERNAME=""
33+
ENV AUTH_BASIC_PASSWORD=""
34+
ENV AUTH_BEARER=""
35+
ENV AUTH_APIKEY_HEADER_NAME=""
36+
ENV AUTH_APIKEY_VALUE=""
37+
ENV REST_ENABLE_SSL_VERIFY="true"
38+
ENV REST_RESPONSE_SIZE_LIMIT="10000"
39+
40+
# Command to run the server
41+
ENTRYPOINT ["node", "build/index.js"]

0 commit comments

Comments
 (0)