Spaces:
Runtime error
Runtime error
File size: 757 Bytes
1951701 63f45bf 1951701 c37ea79 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # 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
|