The project is built on three containers that interact with each other via Docker Compose and are managed via GitHub Actions.
Each module is responsible for its own part of the functionality:
- backend β Flask API application that processes REST requests and business logic
- frontend β Express application on Node.js that provides a web interface and requests data from the backend
- nginx β reverse proxy that receives external requests and forwards them to the desired container
π Component interaction diagram:
Client βββΊ NGINX (Reverse Proxy) βββΊ Frontend (Node.js Express)
β
βββββββΊ Backend (Flask API)
Docker Compose provides:
- π¦ Quick deployment of the entire infrastructure based on
docker-compose.yml - π Creation of a common network between services (by default β bridge)
- π οΈ Simplified launch and testing of components in isolation
Example of launch:
sudo docker compose up --buildGitHub Actions automates the CI/CD process:
- π§ͺ CI (Continuous Integration): testing and building images with each push
- π€ CD (Continuous Delivery): publishing Docker images to Docker Hub
π¦ CI/CD Pipeline:
- β
The developer makes a
pushto the main or dev branch - ποΈ GitHub Actions runs a workflow from
.github/workflows/docker-ci.yml - π³ For each component:
- Build a Docker image
- Run tests (if any)
- Login to Docker Hub using secrets
- Push an image to Docker Hub with tags (e.g.
USERNAME/backend:latest)
- π After a successful publish, you can:
- Run locally with
docker-compose.yml - Deploy to production with
docker-compose.prod.yml
- Run locally with