A production-style containerized task management application built with Docker and Docker Compose.
The stack demonstrates a typical backend architecture using Nginx as a reverse proxy and load balancer, Flask API instances, PostgreSQL for persistence, and Redis for caching.
Client → Nginx (SSL + Load Balancer) → Flask API (2 instances) → PostgreSQL + Redis
Services included:
- Nginx – Reverse proxy, SSL termination, load balancing
- Flask (x2) – REST API running with Gunicorn
- PostgreSQL – Persistent relational database
- Redis – In-memory caching layer
. ├── Dockerfile ├── docker-compose.yml ├── flask_app.py ├── requirements.txt ├── init.sql ├── .dockerignore ├── .env.example │ ├── conf/ │ └── nginx.conf │ ├── ssl/ │ └── generate_ssl.sh │ └── static/
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Main application page |
| GET | /api/health |
Service health check |
| GET | /api/tasks |
List tasks |
| POST | /api/tasks |
Create task |
| PATCH | /api/tasks/<id>/done |
Mark task completed |
Clone the repository
git clone https://github.com/ahmedswilam141/dockerized-task-manager.git
cd task-manager-docker
## Create environment variables
cp .env.example .env
## Generate SSL certificate
cd ssl
bash generate_ssl.sh
cd ..
## Build and start containers
docker compose up -d --build
## Check services
docker compose ps
## Access the Application
- Open in your browser:
https://localhost
- Test the health endpoint:
curl -k https://localhost/api/health
- Expected response:
{"status":"healthy","db":true,"redis":true}