Spaces:
Sleeping
Sleeping
| # Use Node.js as the base image | |
| FROM node:22-alpine | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files first to leverage cache | |
| COPY package*.json ./ | |
| # Install dependencies (including devDependencies for building) | |
| RUN npm ci | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Build the Svelte application | |
| RUN npm run build | |
| # Install a simple static file server | |
| RUN npm install -g serve | |
| # Expose port 7860 (Hugging Face default) | |
| EXPOSE 7860 | |
| # Serve the 'dist' directory on port 7860 | |
| CMD ["serve", "-s", "dist", "-l", "7860"] | |