20 lines
431 B
Docker
20 lines
431 B
Docker
# The SPA is built with node here and shipped as static files.
|
|
# The runtime image is nginx only - no node, no bun.
|
|
FROM node:22-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY frontend/ .
|
|
RUN npm run build
|
|
|
|
# ---- runtime ----
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY .build/prod/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|