docker-compose pre prod (non final)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
@@ -0,0 +1,20 @@
|
||||
# ---- builder: npm ci + vite build -----------------------------------------
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ---- runtime: static files served by nginx ---------------------------------
|
||||
FROM nginx:1.27-alpine AS runtime
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# Rendered to /etc/nginx/conf.d/default.conf at container start by the base
|
||||
# image's docker-entrypoint.sh, substituting ${BACKEND_UPSTREAM} (set via
|
||||
# compose env, e.g. "backend:5000").
|
||||
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user