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`.
7 lines
96 B
YAML
7 lines
96 B
YAML
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "${PORT:-8080}:80"
|
|
restart: unless-stopped
|