A full-stack, production-ready Dockerized application using:
- React frontend
- Node.js + Express API
- MongoDB for persistent data
- Redis cache for performance
- Nginx as a reverse proxy
Built with advanced Docker features including multi-stage builds, custom images, volumes, networks, secrets, health checks, and log rotation.
multi-service-app/
├── api/ # Node.js Express backend
├── web/ # React frontend
├── nginx/ # Nginx reverse proxy config
├── secrets/ # Docker secrets (e.g., MongoDB password)
├── docker-compose.yml
└── .env # Centralized environment variables
✅ Multi-container setup using Docker Compose
✅ Custom Dockerfiles for frontend and API
✅ Multi-stage build for optimized frontend image
✅ Persistent volumes for MongoDB and Redis
✅ Docker secrets for secure credentials
✅ Health checks for all services
✅ Log rotation via Docker logging driver
✅ Services communicate over shared Docker network
- Docker + Docker Compose
- Node.js (for development)
- Git
git clone https://github.com/shakeelkhuhro/multi-service-app.git
cd multi-service-appCreate the MongoDB root password file:
mkdir -p secrets
echo "your-secure-password" > secrets/mongo-root-password.txtdocker compose up -d --build| Service | URL |
|---|---|
| Frontend | http://localhost |
| API | http://localhost/api |
| MongoDB | internal (not exposed) |
| Redis | internal (not exposed) |
Each service includes a health check to ensure stability and reliability in orchestration environments.
All services use json-file logging with rotation:
max-size: 10mmax-file: 3
Logs can be viewed with:
docker compose logs <service>docker compose down -vThis project is part of the Multi-Service Docker Project on roadmap.sh. It provides a real-world scenario for practicing advanced Docker features such as custom images, secrets, volumes, and reverse proxies.
MIT License — feel free to use, share, and improve.