The project ships a multi-stage Dockerfile that compiles the React SPA with Vite and serves the resulting static bundle with nginx on port 5173. The entire build is self-contained — no external build servers or CI pipelines are required. A singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vancovx/KunnaClienteMCP/llms.txt
Use this file to discover all available pages before exploring further.
docker build command produces a lean, production-ready image based on nginx:stable-alpine.
Docker build
The Dockerfile uses two stages. The first stage usesnode:20-alpine to install dependencies and run vite build, producing a compiled bundle in dist/. The second stage copies only that dist/ output into an nginx:stable-alpine image alongside the custom nginx.conf, resulting in a minimal final image with no Node.js runtime.
builder: Starts from node:20-alpine, installs all npm dependencies, copies the full source tree, and runs vite build to emit the optimised bundle into dist/.
Stage 2 — nginx: Starts from nginx:stable-alpine, copies the compiled dist/ directory into nginx’s document root (/usr/share/nginx/html), replaces the default nginx configuration with the project’s nginx.conf, exposes port 5173, and starts nginx in the foreground.
Build and run
Build the Docker image
Run the following command from the project root. The
npm run build-docker script is an alias for the same docker build invocation:nginx configuration
The customnginx.conf configures a single virtual server that listens on port 5173 and serves static files from /usr/share/nginx/html — the directory where the Vite bundle was placed during the Docker build. The critical try_files $uri $uri/ /index.html directive ensures that any URL path unknown to nginx (i.e. any client-side route managed by react-router-dom) falls back to index.html, allowing the React application to handle routing entirely in the browser. A matching error_page 404 directive applies the same fallback for 404 responses.
Production build without Docker
If you prefer to manage your own web server, you can build the static bundle directly and preview it locally before deploying:npm run build writes the optimised output to dist/. npm run preview starts Vite’s built-in preview server so you can verify the production build behaves correctly before copying dist/ to your hosting environment of choice.