A Flask app connected to Redis via Docker Compose. Tracks page visits using a Redis-backed counter. Built as a hands-on practice project for learning multi-container Docker setups.
A minimal Flask web server increments a visit counter in Redis every time the root route is hit.
docker compose upThen visit http://localhost:5000
Redis data is stored in a named Docker volume (redis-data), so the visit counter survives container restarts. Without this, Redis data would live only in the container's temporary layer and reset to 0 every time docker compose down runs.
- Docker Compose: running multiple containers together with one command instead of separate
docker runs - Service-to-service networking by name (Flask connects to Redis using
host='redis', no manual IP config) - Docker named volumes for persistent storage
- Difference between a container's disposable filesystem and a volume's persistent storage
This project uses GitHub Actions to automatically build and test the app on every push to main. The workflow:
- Builds the Docker images from scratch
- Starts the full Flask + Redis stack
- Sends a real HTTP request to verify the app responds correctly
- Tears everything down afterward
See .github/workflows/docker-build.yml for the full pipeline.