Overview
Sometimes an app deployment fails due to resource constraints, configuration conflicts, or upstream issues. This guide covers how to diagnose and roll back.
Diagnosing the Failure
# Check container status\ndocker ps -a\n\n# View logs for the failing container\ndocker logs CONTAINER_NAME --tail=100\n\n# Check system resources\nfree -h\ndf -hCommon Failure Causes
- Out of memory — Upgrade to a larger plan or reduce container memory limits
- Port conflict — Another service is using the same port
- Disk full — Clear old Docker images with
docker system prune - Database connection — Check credentials in .env file
Rolling Back
# Stop the failed deployment\ncd /opt/apps/YOUR_APP\ndocker compose down\n\n# If you have a backup, restore it\ndocker compose -f docker-compose.backup.yml up -d\n\n# Or redeploy the previous version\ndocker compose pull APP_IMAGE:previous-tag\ndocker compose up -dContacting Support
If you cannot resolve the issue, open a support ticket with the output of docker logs and docker compose ps.