Python - Flask - Redis
Flask is a lightweight and flexible web framework written in Python that is used to build web applications. Flask is classified as a “microframework” because it provides the essential tools to create web applications, but does not impose a specific structure or specific components, giving developers great flexibility and freedom to choose the libraries and tools they want to use in their projects.
On the other hand, Redis (Remote Dictionary Server) is a high-performance open-source in-memory database used to store, retrieve, and manage data in key-value pairs. With an in-memory storage architecture, Redis offers exceptional speed and low latency in read and write operations, making it ideal for applications that require fast access to data, such as caches, queue systems, and more. In addition to its ability to store simple data, Redis also supports more complex data structures, such as lists, sets, maps, and more, making it a powerful tool for developing scalable, high-performance applications.
Project structure
.
├── compose.yaml
├── app.Dockerfile
├── app
├── requirements.txt
└── app.py
Deploying the application
cd /root/stack/python/flask-redis
docker compose up -d
Check container status
$ docker compose ps
Stop and remove the container
$ docker compose down