# Use official Node.js 18 LTS as base image FROM node:18 # Set working directory WORKDIR /app # Copy package.json and package-lock.json (if exists) COPY package*.json ./ # Install dependencies RUN npm install # Copy source files COPY . . # Copy ca.pem (ensure it's included in the image) COPY ca.pem ./ca.pem # Build the application (compiles TypeScript and copies ca.pem to dist) RUN npm run build # Expose port 3000 (Hugging Face Spaces default) EXPOSE 3000 # Start the application CMD ["npm", "start"]