# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a node image with version 22.x for building
FROM node:22-alpine AS builder
# Create app directory
WORKDIR /app
# Copy source code and package.json into the app directory
COPY package.json tsconfig.json ./
COPY src ./src
# Install dependencies and build the application
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts
RUN npm run build
# Use a smaller node image for running the app
FROM node:22-alpine
# Set working directory
WORKDIR /app
# Copy built application from the builder stage
COPY --from=builder /app/dist ./dist
COPY package.json ./
# Install only production dependencies
RUN npm install --production
# Set environment variables
ENV KIBELA_TEAM=your-team
ENV KIBELA_TOKEN=your-token
# Expose the port the app runs on
EXPOSE 3000
# Command to run the executable
ENTRYPOINT ["node", "dist/src/index.js"]