A simple distributed application running across multiple Docker containers, featuring Python, .NET, Node.js, and Redis/PostgreSQL for messaging and storage.
First, install Docker:
- Mac/Windows: Download Docker Desktop (includes Docker Compose).
- Linux: Ensure you have the latest Docker Compose.
Build and start the app with:
docker compose up- The vote app will be available at localhost:8080
- The results app will be available at localhost:8081
If you don’t have a swarm initialized, do this first:
docker swarm initThen deploy the app:
docker stack deploy --compose-file docker-stack.yml voteThe folder k8s-specifications contains YAML files for deploying the Voting App.
kubectl create -f k8s-specifications/- Vote app: Accessible on port 31000 of each cluster node.
- Result app: Accessible on port 31001.
kubectl delete -f k8s-specifications/- 🐍 Python (vote) – Frontend voting web app
- 🔄 Redis – Collects new votes
- 🏗️ .NET (worker) – Consumes votes and stores them in PostgreSQL
- 🗄️ PostgreSQL – Persistent database backed by a Docker volume
- 🟢 Node.js (result) – Real-time results display
- Each browser only registers one vote per session.
- This is not a fully optimized distributed architecture—it’s a simple demonstration.
If you found this helpful, consider:
- ⭐ Starring this repository to show support
- 📢 Sharing with your network
- 💬 Connecting with me on Twitter @sanjaykumarwebs
Let me know if you'd like further refinements! 🚀