# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js image as a parent image
FROM node:18-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package.json /app
# Install the dependencies
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts
# Copy the current directory contents into the container at /app
COPY . /app
# Build the project
RUN npm run build
# Production image
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy the build output and package.json from the builder stage
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
# Install only production dependencies
RUN npm install --only=production
# Environment variables (to be overridden at runtime)
ENV HUNTRESS_API_KEY=your_api_key_here
ENV HUNTRESS_API_SECRET=your_api_secret_here
# Run the server
ENTRYPOINT ["node", "build/index.js"]