Minimalist, high-performance starter with multi-stage Docker/Nginx orchestration.
- Build Tool: Vite
- Language: TypeScript
- Styling: Tailwind CSS
- Server: Nginx
# dev
npm install
npm run dev
# prod
npm run build
npm run previewvite-tsconfig-pathsprettierprettier-plugin-tailwindcsseslint-config-prettier
The Dockerfile executes a binary separation of concerns:
- Build Stage: Node:20-Alpine environment to resolve
node_modulesand transpile TSX. - Production Stage: Nginx:Alpine. Only the
/distfolder is persisted.
I've added nginx config to support React Router client-side navigation and prevent 404s on refresh.
docker build -t app-name .
docker run -dt -p 3000:80 --name app-container app-name