# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM node:22.12-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts
# Copy the source code
COPY src ./src
# Copy the TypeScript configuration
COPY tsconfig.json ./
# Build the project
RUN npm run build
FROM node:22-alpine AS release
# Set working directory
WORKDIR /app
# Copy the build output and package files
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
COPY --from=builder /app/package-lock.json ./
# Set environment variables (replace placeholders with actual values)
ENV CONFLUENCE_API_MAIL=your-email
ENV CONFLUENCE_API_KEY=your-key
ENV CONFLUENCE_URL=your-confluence-url
ENV JIRA_URL=your-jira-url
# Install production dependencies
RUN npm ci --omit=dev
# Define the command to run the application
ENTRYPOINT ["node", "build/index.js"]