-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
40 lines (29 loc) · 1.03 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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image with Puppeteer dependencies
FROM node:22-alpine AS builder
# Install necessary build tools
RUN apk add --no-cache make gcc g++ python3
# Create app directory
WORKDIR /app
# Copy project files to the working directory
COPY package.json package-lock.json tsconfig.json ./
COPY src ./src
# Install dependencies
RUN npm install
# Build the project
RUN npm run build
# Use a clean Node.js image for the final build
FROM node:22-alpine
WORKDIR /app
# Copy built files and node_modules from the builder
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/package.json /app/package.json
# Set environment variables (adjust as necessary)
ENV STEEL_LOCAL=true
ENV STEEL_BASE_URL=http://localhost:3000
ENV GLOBAL_WAIT_SECONDS=1
# Expose the necessary port if required by your application
EXPOSE 3000
# Define the command to run your application
ENTRYPOINT ["node", "dist/index.js"]