Spaces:
Sleeping
Sleeping
| # Use Node.js 18 | |
| FROM node:18-alpine | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files first (better caching) | |
| COPY package.json . | |
| # Install dependencies | |
| RUN npm install | |
| # Copy the rest of the app source code | |
| COPY . . | |
| # Build the app for production | |
| RUN npm run build | |
| # Install a simple server to serve the static files | |
| RUN npm install -g serve | |
| # Hugging Face Spaces expect port 7860 | |
| EXPOSE 7860 | |
| # Start the server pointing to the 'dist' (build) folder | |
| CMD ["serve", "-s", "dist", "-l", "7860"] | |