Quick Reference
One-Line Deployments
Section titled “One-Line Deployments”# GitHub Pagespython3 build.py && git add . && git commit -m "Deploy" && git push
# Dockerdocker-compose up -d --build
# Supervisorsudo supervisorctl restart snapcodeManagement Commands
Section titled “Management Commands”| Action | GitHub Pages | Supervisor | Docker |
|---|---|---|---|
| Deploy | git push | supervisorctl restart | docker-compose up -d |
| Logs | GitHub Actions | tail -f /var/log/snapcode/access.log | docker-compose logs -f |
| Status | GitHub Pages tab | supervisorctl status | docker ps |
| Stop | - | supervisorctl stop snapcode | docker-compose down |
Quick Decisions
Section titled “Quick Decisions”| Need | Solution |
|---|---|
| Free hosting? | GitHub Pages |
| Have VPS? | Supervisor |
| Learning DevOps? | Docker |
| Need scaling? | Docker |
| Want simplicity? | GitHub Pages |
Quick Fixes
Section titled “Quick Fixes”Port already in use
Section titled “Port already in use”sudo lsof -i :8000sudo kill -9 <PID>Docker not starting
Section titled “Docker not starting”docker-compose downdocker-compose up -d --build --force-recreateSupervisor not working
Section titled “Supervisor not working”sudo supervisorctl rereadsudo supervisorctl updatesudo supervisorctl restart snapcodeHealth Checks
Section titled “Health Checks”# Localcurl http://localhost:8000
# Dockerdocker inspect --format='{{.State.Health.Status}}' snapcode
# Supervisorsudo supervisorctl status snapcode