Files
emba-course-solver/Dockerfile
Bill Ballou 663d70e44b Add Docker Compose deployment with multi-stage build and nginx
Multi-stage Dockerfile builds the Vite app in Node 22 and serves static
assets from nginx:alpine. Includes gzip compression, SPA fallback routing,
immutable cache headers for hashed assets, and configurable port mapping
(default 8080). Deploy with `docker compose up -d`.
2026-02-28 23:01:50 -05:00

13 lines
249 B
Docker

# Stage 1: Build
FROM node:22-alpine AS build
WORKDIR /build
COPY app/ ./
RUN npm ci
RUN npx vite build
# Stage 2: Serve
FROM nginx:alpine
COPY --from=build /build/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80