File size: 473 Bytes
3a859a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31f7326
 
3a859a0
 
 
 
 
 
 
31f7326
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
# Use official Node image
FROM node:18

# Set working directory
WORKDIR /app

# Copy package.json and install deps
COPY package.json package-lock.json* ./
RUN npm install --legacy-peer-deps

# Copy all files
COPY . .

# Build React app
RUN npm run build

ENV REACT_APP_HF_TOKEN=${HF_TOKEN}

# Install a simple static server
RUN npm install -g serve

# Expose port 7860 (HF default)
EXPOSE 7860

# Start the React build with serve
CMD ["serve", "-s", "build", "-l", "7860"]