File size: 420 Bytes
03fb333
 
 
 
 
 
 
 
fbbc3bc
03fb333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:18-slim

WORKDIR /app

# Copy package files
COPY package*.json ./

# Install all dependencies (including devDependencies for build)
RUN npm install

# Copy application files
COPY . .

# Build the React app
RUN npm run build

# Remove devDependencies after build
RUN npm prune --production

# Expose port
EXPOSE 7860

# Set environment variable
ENV NODE_ENV=production

# Start server
CMD ["node", "server.js"]