FROM node:18-slim

# Create app directory
WORKDIR /app

# Copy package.json and install dependencies
COPY package*.json ./
RUN npm install --production

# Copy the server source code
COPY server.js .

# Expose Hugging Face Space default port
EXPOSE 7860

# Run the server
CMD [ "node", "server.js" ]
