# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Node.js 18 image as a parent image
FROM node:18-alpine AS build
# Set the working directory
WORKDIR /app
# Copy the package.json and package-lock.json to the working directory
COPY package*.json ./
COPY tsconfig.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code to the working directory
COPY . .
# Compile the TypeScript code
RUN npm run build
# Use a minimal Node.js 18 image for the final build
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy only the necessary files from the build stage
COPY --from=build /app/build /app/build
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/package-lock.json /app/package-lock.json
# Install only production dependencies
RUN npm ci --omit=dev
# Environment variables
ENV CLIENT_ID=""
ENV CLIENT_SECRET=""
ENV SITE_ID="MLA"
# Command to run the server
CMD ["node", "build/index.js"]