React 19 + Vite storefront served by Nginx with /api reverse proxy.
70
Production frontend for the Mxmobilz mobile-phone e-commerce platform.
The frontend uses a multi-stage Docker build:
Node.js 22 Alpine
↓
Build React/Vite application
↓
Generate static /dist assets
↓
Nginx Alpine
↓
Serve production static files
Node.js, npm, Vite, TypeScript and node_modules are excluded
from the final production image.
/api reverse proxyBACKEND_URLnpm ci.dockerignore for smaller and safer build contextThe frontend was optimized from a single-stage Node.js image to a multi-stage Node.js → Nginx architecture.
| Version | Image Size |
|---|---|
| 1.0.1 | ~650 MB |
| 1.0.2 | ~95.9 MB |
Result: ~554 MB reduction (~85% smaller).
The final image contains only the compiled React application and the Nginx runtime.
Set the backend URL when starting the container:
docker run -d \
-p 3000:80 \
-e BACKEND_URL=http://backend-service:80 \
mxmobilz-web:<tag>
Content type
Image
Digest
sha256:68c98eb72…
Size
25.9 MB
Last updated
25 days ago
docker pull hamzasarfraz862/front-end-app:1.0.0