wiki-project / Dockerfile
Nagi15's picture
Update Dockerfile
7630f81 verified
raw
history blame contribute delete
469 Bytes
# Use official Node image
FROM node:18
# Set working directory
WORKDIR /app
# Copy dependency files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build the React app (assumes Vite or CRA)
RUN npm run build
# Install static server
RUN npm install -g serve
# Expose port 8080 (required by Hugging Face)
EXPOSE 8080
# Serve the app from /dist and bind to 0.0.0.0
CMD ["sh", "-c", "serve -s dist -l tcp://0.0.0.0:8080"]