# 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"]