forked from makafeli/n8n-workflow-builder
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 865 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 865 Bytes
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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use Node.js as the base image
FROM node:20-alpine AS builder
# Set the working directory in the container
WORKDIR /app
# Copy the package files and install dependencies
COPY package.json package-lock.json ./
RUN npm install
# Copy the source code
COPY src ./src
COPY tsconfig.json ./
# Compile the TypeScript code
RUN npx tsc
# Use a slim Node.js image for the final build
FROM node:20-slim
# Set the working directory in the container
WORKDIR /app
# Copy compiled code from the builder stage
COPY --from=builder /app/dist ./dist
# Install only production dependencies
COPY package.json package-lock.json ./
RUN npm install --omit=dev
# Expose any necessary ports (assuming 3000 as an example)
EXPOSE 3000
# Command to run the application
CMD ["node", "dist/index.js"]