HydroSense / Dockerfile
dpv007's picture
Clean sample deploy
53c9876
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"]