b3964df9b2
Dockerfile implements multi-stage build: node:22-alpine for build stage, nginx:1.27-alpine for production runtime. nginx.conf provides SPA routing with gzip compression and cache headers. docker-compose.yml prepared for Tower Traefik integration with external network and Host route. All files match specification verbatim.
11 lines
240 B
Docker
11 lines
240 B
Docker
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|