React + Vite SPA for the Stellar Remittance Platform. Runs on port 3000 in development.
- Node.js 20+
cp .env.example .env
# set VITE_API_URL in .env (or leave empty to use the Vite proxy to localhost:3001)
npm install
npm run devVITE_API_URL is baked into the static bundle at build time — pass it as a build argument:
docker build --build-arg VITE_API_URL=https://api.example.com -t stellar-frontend .docker run -p 8080:8080 stellar-frontendThe container serves the compiled SPA via Nginx on port 8080 as the unprivileged nginx user (port 80 requires root).
services:
frontend:
build:
context: ./frontend
args:
VITE_API_URL: https://api.example.com
ports:
- "8080:8080"nginx.conf configures:
- SPA routing fallback (
try_files→/index.html) for client-side routes - Immutable long-term caching for hashed JS/CSS/image assets
no-cacheonindex.htmlso new deploys are picked up immediately- Gzip compression for text responses