Spaces:
Sleeping
Sleeping
| # Use Node.js LTS base image | |
| FROM node:20 | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY package.json package-lock.json* ./ | |
| # Install dependencies | |
| RUN npm install | |
| # Copy the rest of the app | |
| COPY . . | |
| # Use HF Spaces port | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Install curl for optional healthcheck | |
| RUN apt-get update && apt-get install -y curl | |
| # Optional: Healthcheck | |
| HEALTHCHECK --interval=10s --timeout=5s --start-period=5s \ | |
| CMD curl -f http://localhost:$PORT/api/shadow/status || exit 1 | |
| # Start the backend | |
| CMD ["npm", "start"] | |