forked from LFGBanditLabs/Quipay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 1.43 KB
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
## ─────────────────────────────────────────────────────────────────────────────
## Stage 1: Build (includes dev dependencies + toolchain)
## ─────────────────────────────────────────────────────────────────────────────
FROM node:22-alpine AS build
WORKDIR /app
# Install dependencies (including dev deps) for build
COPY package*.json ./
RUN npm ci
# Copy source and build
COPY . .
RUN npm run build
## ─────────────────────────────────────────────────────────────────────────────
## Stage 2: Runtime (tiny nginx image serving dist/)
## ─────────────────────────────────────────────────────────────────────────────
FROM nginx:alpine AS runtime
# SPA routing + sensible caching
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Static site output
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]