A production-ready Flask-SocketIO + Redis real-time chat platform, demonstrating multi-container orchestration, WebSocket communication, Redis Pub/Sub messaging, and Dockerized scalability for modern DevOps and Cloud projects.
DockChat showcases how to build a fully containerized real-time system using Flask-SocketIO, Redis, and Nginx, all orchestrated with Docker Compose. It highlights scalable WebSocket communication, message queuing, and load-ready networking between containers.
Perfect for demonstrating your DevOps, Cloud, and Microservice skills in interviews or portfolios.
- Flask-SocketIO (Python) – Web framework for WebSockets
- Redis – Message queue and in-memory state store
- Gunicorn + Eventlet – Async web server for real-time events
- Nginx – Reverse proxy handling WebSocket upgrades
- Docker & Docker Compose – Container orchestration and networking
- Logging + Health Checks – For uptime and monitoring
✅ Dynamic multi-room chat (public/private) ✅ Real-time user list updates ✅ Typing indicators and timestamps ✅ WebSocket-powered instant communication ✅ Redis-based message queue for scaling ✅ Health checks, logging, and .env-driven config ✅ Reverse-proxied through Nginx with containerized orchestration
📦 DockChat
├── web/ (Flask-SocketIO)
│ ├── app.py # Flask backend
│ ├── templates/index.html
│ ├── Dockerfile # Gunicorn + Eventlet
│ ├── requirements.txt
├── nginx/
│ ├── nginx.conf # WebSocket proxy config
│ ├── Dockerfile
├── redis/
│ └── redis.conf
├── docker-compose.yml # Orchestrates services
├── .env # Environment variables
└── README.md # Documentation
docker compose up --build -ddocker psExpected:
dockchat_web
redis
nginx
- Chat UI: http://localhost:8080
- Health Check: http://localhost:8080/healthz
The /healthz endpoint confirms uptime:
{
"status": "ok"
}Check logs for live monitoring:
docker logs dockchat-web -f- Flask logs incoming Socket.IO and HTTP requests
- Gunicorn outputs worker health and activity
- Docker health checks monitor Redis and web service
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
Flask secret key | change-me |
FLASK_ENV |
Environment mode | production |
SOCKETIO_MESSAGE_QUEUE |
Redis URI | redis://redis:6379/1 |
CHAT_DEFAULT_ROOM |
Default chat room | lobby |
MAX_ROOM_HISTORY |
Max message history per room | 50 |
- Multi-container orchestration with Docker Compose
- Real-time communication via Flask-SocketIO + Eventlet
- Redis Pub/Sub for horizontal scalability
- Reverse proxy setup using Nginx for WebSocket traffic
- System monitoring with health checks and logs
- 🔐 JWT-based authentication
- 💾 Persistent message DB (PostgreSQL)
- ☁️ Deployment on AWS ECS / GCP Cloud Run
- 📈 Prometheus + Grafana integration
- 🔄 CI/CD via GitHub Actions
Gaurav Chile DevOps & Security Enthusiast 🚀 Building containerized systems that connect code, cloud & communication.
Licensed under the MIT License — feel free to use, improve, and build upon DockChat.