A production-ready React frontend application designed as Phase 1 of a complete CI/CD and GitOps pipeline. This project demonstrates modern DevOps practices with clean architecture, containerization, and deployment readiness.
This is a minimal, professional frontend application built to showcase:
- Modern React development with Vite
- Production-grade Docker containerization
- Nginx web server configuration
- CI/CD pipeline readiness
- Future Kubernetes deployment compatibility
fe-demo-app/
├── src/
│ ├── App.jsx # Main application component
│ ├── App.css # Application styles
│ ├── main.jsx # React entry point
│ └── index.css # Global styles
├── public/ # Static assets (auto-created)
├── Dockerfile # Multi-stage Docker build
├── nginx.conf # Nginx server configuration
├── vite.config.js # Vite build configuration
├── package.json # Dependencies and scripts
└── index.html # HTML template
- Node.js 18+ and npm
- Docker (for containerization)
- Install dependencies:
cd fe-demo-app
npm install- Run development server:
npm run devAccess the app at http://localhost:5173
- Build for production:
npm run buildOutput will be in the dist/ directory.
- Preview production build:
npm run preview# Build the image
docker build -t fe-demo-app:latest .
# Build with specific tag
docker build -t fe-demo-app:v1.0.0 .# Run on port 8080
docker run -d -p 8080:80 --name fe-demo fe-demo-app:latest
# Access the app
open http://localhost:8080# View logs
docker logs fe-demo
# Stop container
docker stop fe-demo
# Remove container
docker rm fe-demo
# Health check
curl http://localhost:8080/health- Base Images:
- Builder:
node:18-alpine(lightweight Node.js) - Runtime:
nginx:1.25-alpine(minimal web server)
- Builder:
- Multi-stage build: Optimized for small image size
- Production optimizations:
- Gzip compression enabled
- Static asset caching (1 year)
- Security headers configured
- Health check endpoint at
/health
| Component | Technology | Purpose |
|---|---|---|
| Framework | React 18 | UI library |
| Build Tool | Vite | Fast development and build |
| Web Server | Nginx | Production static file serving |
| Container | Docker | Application containerization |
- Interactive UI: Counter and deploy button demonstrations
- Responsive Design: Mobile-friendly layout
- Production Ready: Optimized build and serving
- Health Monitoring: Built-in health check endpoint
- Clean Code: Minimal, maintainable structure
This project is designed to integrate with:
- Jenkins pipeline configuration
- Automated builds on git push
- Docker image building and tagging
- Push to Docker registry (Docker Hub/ECR)
- Kubernetes manifests (Deployment, Service, Ingress)
- ArgoCD application configuration
- Automated deployment from git repository
- Environment-specific configurations (dev/staging/prod)
- Application metrics
- Log aggregation
- Health monitoring
- Performance tracking
- Optimized for SPA routing
- Gzip compression enabled
- Security headers configured
- Static asset caching
- Health check endpoint
- Multi-stage build for optimization
- Production dependencies only
- Minimal final image size
- Health check included
# Test local build
npm run build && npm run preview
# Test Docker build
docker build -t fe-demo-app:test .
docker run -p 8080:80 fe-demo-app:test
# Test health endpoint
curl http://localhost:8080/healthThe multi-stage Dockerfile ensures:
- Build dependencies are not included in final image
- Only production artifacts are served
- Alpine Linux base for minimal footprint
- Typical final image size: ~25-30MB
- No exposed secrets or credentials
- Security headers configured in Nginx
- Minimal attack surface (Alpine base)
- Non-root user execution (Nginx default)
- Health check for container orchestration
✅ Multi-stage Docker builds
✅ .dockerignore for build optimization
✅ Production-grade Nginx configuration
✅ Health check endpoints
✅ Proper caching strategies
✅ Security headers
✅ Clean project structure
✅ Version control ready
This is a demo project for CI/CD learning. Feel free to:
- Fork and experiment
- Add features for learning
- Integrate with your own CI/CD tools
- Extend with backend services
MIT License - Free to use for learning and portfolio projects.
Built as a resume-grade DevOps demonstration project.
Version: 1.0.0
Status: ✅ Production Ready
Next Phase: CI/CD Pipeline Integration