CoolFace
Apppublic

pearlselvan/testreact

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
Dockerfile32 linesDownload Raw Back to root
1# Use Node.js for building2FROM node:18-alpine as build3 4WORKDIR /app5 6# Copy package files7COPY package*.json ./8 9# Install dependencies10RUN npm install11 12# Copy source code13COPY . .14 15# Build the app16RUN npm run build17 18# Use nginx to serve the static files19FROM nginx:alpine20 21# Copy the built files from the build stage22COPY --from=build /app/build /usr/share/nginx/html23 24# Copy nginx configuration25COPY nginx.conf /etc/nginx/conf.d/default.conf26 27# Expose port 7860 (Hugging Face Spaces default)28EXPOSE 786029 30# Start nginx31CMD ["nginx", "-g", "daemon off;"]32