-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
37 lines (26 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js runtime as a parent image
FROM node:18-alpine AS builder
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./
# Install any needed packages specified in package.json
RUN npm install
# Copy the rest of the application code to the working directory
COPY . .
# Build the project to generate JavaScript files in the 'dist' directory
RUN npm run build
# Use a separate image for running the application
FROM node:18-alpine
# Set the working directory in the container
WORKDIR /app
# Copy the compiled 'dist' folder and package.json
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package-lock.json ./
# Install only production dependencies
RUN npm ci --omit=dev
# Environment variable for Jina AI API key
ENV JINA_API_KEY=<YOUR_KEY>
# Command to run the application
ENTRYPOINT ["node", "dist/index.js"]