Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Docker Compose Practice

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.

What it does

A minimal Flask web server increments a visit counter in Redis every time the root route is hit.

Run it locally

docker compose up

Then visit http://localhost:5000

Persistence

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.

What I learned

  • 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

CI/CD

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages