-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
41 lines (29 loc) · 1.06 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
38
39
40
41
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node runtime as the base image
FROM node:16-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json /app/
COPY tsconfig.json /app/
# Install dependencies
RUN npm install
# Copy the rest of the application's source code
COPY . /app
# Build the application
RUN npm run build
# Use a lightweight Node runtime as the release image
FROM node:16-alpine AS release
# Set the working directory
WORKDIR /app
# Copy the built application from the builder stage
COPY --from=builder /app/dist /app/dist
# Copy package.json and package-lock.json
COPY --from=builder /app/package.json /app/package-lock.json /app/
# Install only production dependencies
RUN npm ci --only=production
# Set environment variables (You need to set these while running the Docker container)
# ENV YOUTUBE_API_KEY=<Your-YouTube-API-Key>
# ENV YOUTUBE_TRANSCRIPT_LANG=en
# Define the command to run the application
CMD ["node", "dist/index.js"]