build: add nginx docker image and compose

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.
This commit is contained in:
L'électron rare
2026-07-09 12:22:42 +02:00
parent aa81b39600
commit b3964df9b2
4 changed files with 55 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
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