Check that:
- 🔐
DOCKER_USERNAMEandDOCKER_PASSWORD(orDOCKER_TOKEN) variables are added toSettings > Secretson GitHub - ✅
sudo docker loginis run beforedocker pushin the CI pipeline - 📤 You are pushing to the right repository:
USERNAME/imagename
No. One command is enough:
git add .This will add all changes in the current directory and subfolders.
Yes. Clean up unnecessary images, containers, and cache:
sudo docker system prune -aDownload the latest version of the image:
sudo docker pull USERNAME/flask-api:latestRestart containers:
sudo docker compose down && docker compose up -dCheck the image hash:
sudo docker images | grep flask-apiOr open docker-compose.yml and make sure that the image: with the correct tag is used.
- Make sure you are using Docker v20+ (it has
docker composebuilt-in) - On older systems: install
docker-composeseparately or usedocker compose(without the hyphen)
Check the logs:
sudo docker logs <container_name>Possible causes:
- ❌ Code errors (e.g. in
app.py) ⚠️ Missing environment variables- 🚫 Port already taken
sudo docker stop $(docker ps -q)
sudo docker rm $(docker ps -aq)💡 Or with one command:
sudo docker container prune -fCheck Nginx logs:
sudo docker logs nginxMake sure that in default.conf:
- The correct paths are specified (location
/api, location/) - The proxy port matches the backend/frontend port (http://backend:5000, http://frontend:3000)