File size: 723 Bytes
494952f
 
 
 
 
 
 
 
 
 
 
 
 
 
f4ad643
494952f
 
 
ef1fb1a
494952f
ef1fb1a
494952f
ef1fb1a
 
 
 
 
 
494952f
3862c6e
494952f
ef1fb1a
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
29
30
31
32
# =========================================
# Stage 1 — Build Vite App
# =========================================
FROM node:18-alpine AS builder

WORKDIR /app

# Install deps
COPY package*.json ./
RUN npm install

# Copy project files
COPY . .

# Build app (Production mode)
RUN npm run build

# =========================================
# Stage 2 — Serve with Nginx (High Performance)
# =========================================
FROM nginx:alpine

# Copy build artifacts
COPY --from=builder /app/dist /usr/share/nginx/html

# Copy custom Nginx config for Gzip and Caching
# Note: Using nginx.txt as source per user request
COPY nginx.txt /etc/nginx/conf.d/default.conf

EXPOSE 7860

CMD ["nginx", "-g", "daemon off;"]