Spaces:
Runtime error
Runtime error
| # NestJS API with Prisma for Hugging Face Spaces | |
| FROM node:22-alpine | |
| # Install required dependencies for Prisma and FFmpeg | |
| RUN apk add --no-cache \ | |
| openssl \ | |
| ffmpeg \ | |
| python3 \ | |
| make \ | |
| g++ | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY package*.json ./ | |
| COPY prisma ./prisma/ | |
| # Copy source code | |
| COPY . . | |
| # Install dependencies and generate Prisma client with dummy DATABASE_URL (needed for build) | |
| ENV DATABASE_URL="postgresql://dummy:dummy@localhost:5432/dummy" | |
| RUN npm ci && npx prisma generate && npm run build | |
| # Expose port for Hugging Face | |
| EXPOSE 7860 | |
| # Environment variables | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| # Start command - run prisma-all then start the app | |
| CMD npm run prisma-all && npm run start:prod | |