This page walks through building the Euroautos Inspection Form for production and deploying it to a live environment. Follow the section that matches your chosen hosting platform — Vercel, Netlify, or Docker with Nginx.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/juanmatz/inspection-form-euroautos/llms.txt
Use this file to discover all available pages before exploring further.
Build for production
Set production environment variables
Create a
.env.production file in the project root with all required variables for your live environment. This file is loaded automatically by Vite when building with npm run build.Run the production build
Install dependencies (if not already done) and compile the application:The build typically completes in 30–90 seconds. A successful build prints a summary of generated chunk sizes:
Inspect the dist/ output
Confirm the Verify that
dist/ directory contains the expected files before deploying:dist/sw.js (the service worker) is present — its absence indicates the PWA plugin did not run correctly.Test the build locally
Run the built application on a local preview server to catch any environment variable or routing issues before deploying:This starts a local server (default port
4173) serving the compiled dist/ directory. Open http://localhost:4173 in your browser and confirm the workshop name and primary colour are correct.npm run preview serves the compiled build, not the development server. Any issues you find here will also appear in production. If the app behaves differently from npm run dev, check that all required VITE_* variables are present in .env.production.Deploy to Vercel
Vercel is the simplest way to deploy the inspection form with zero server management. It supports both Git-based automatic deployments and manual CLI deployments.Option A — GitHub integration (recommended)
Connect your repository
Log in to vercel.com, click Add New → Project, and import your GitHub repository containing the inspection form.
Configure build settings
Vercel will auto-detect the Vite framework. Confirm the following settings in the project configuration:
| Setting | Value |
|---|---|
| Framework Preset | Vite |
| Build Command | npm run build |
| Output Directory | dist |
| Install Command | npm install |
Add environment variables
In the Vercel project dashboard, go to Settings → Environment Variables and add each
VITE_* variable. Set the environment scope to Production (and optionally Preview with different values).Option B — Vercel CLI
Deploy to Netlify
Add a netlify.toml configuration file
Create
netlify.toml in the project root. This file configures the build command, publish directory, and the SPA redirect rule required for client-side routing:Set environment variables
In the Netlify dashboard, go to Site configuration → Environment variables and add each
VITE_* variable. Alternatively, use the Netlify CLI:Deploy with Docker
Use the multi-stage Dockerfile below to build a minimal production image containing only Nginx and the compiled static files.Pass
VITE_* variables as Docker --build-arg flags because they are embedded at build time. They are not read from -e (runtime environment) flags. Update your Dockerfile with the corresponding ARG declarations if you use --build-arg:Nginx configuration for SPA routing
The inspection form uses client-side routing (React Router). Without a proper Nginx configuration, refreshing the page on any route other than/ returns a 404. The following nginx.conf fixes this by falling back to index.html for all unmatched paths.
nginx.conf in the project root so the COPY nginx.conf instruction in the Dockerfile can find it.
Health check
The Nginx configuration above exposes a/health endpoint that returns 200 OK. You can use this for:
-
Docker health checks — add
HEALTHCHECKto your Dockerfile: -
Load balancer probes — configure your load balancer (AWS ALB, GCP Load Balancer, Nginx upstream) to poll
/healthto determine instance availability. -
Uptime monitoring — point a monitoring service (e.g. UptimeRobot, Checkly) at
https://your-domain.com/healthto receive alerts if the deployment goes down.