Spaces:
Sleeping
Sleeping
File size: 561 Bytes
53c9876 | 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 | FROM node:20-alpine
# Set environment variables for Hugging Face Spaces
ENV PORT=3000
ENV HOST=0.0.0.0
# Set working directory
WORKDIR /app
# Install dependencies
COPY package*.json ./
RUN npm install
# Copy application files
COPY . .
# Generate Prisma Client
RUN npx prisma generate
# Build Next.js app
RUN npm run build
# Set production environment ONLY AFTER building
ENV NODE_ENV=production
# Make the start script executable
RUN chmod +x start.sh
# Expose the port matching README.md
EXPOSE 3000
# Run the unified start script
CMD ["./start.sh"]
|