I built a complete CI/CD pipeline from scratch on my VPS using GitHub Actions and Docker. I was initially manually SSH-ing into my server to pull updates but now the setup has evolved into a fully automated deployment system. Now, every push to GitHub triggers: • Automatic deployment to a staging environment. • Docker-based rebuild and restart on my VPS. • Backup creation before every deployment and live testing. • Retention policy (keeps only last 3 backups to manage storage). • Safe promotion from staging → production via Git branching. Architecture: GitHub → GitHub Actions → VPS (SSH) → Docker → Nginx Proxy Manager → Live Sites Tech stack: • GitHub Actions • Docker & Docker Compose • Ubuntu VPS • Nginx Proxy Manager • SSH key authentication Key learning: Building systems is not about tools — it's about designing reliable flows between them. This project has helped me grow from deploying apps to engineering deployment systems. Next step: extending this to multiple projects and scaling automation further. Below is a detailed architecture diagram that shows my implementation. #DevOps #Docker #DeploymentSystems #WorkflowAutomation #SSH
Nice architecture. Another improvement that could take this further is building images in GitHub Actions and pushing them to a registry, then letting the VPS only pull and run them. It reduces build load on the server and improves consistency
clean architecture, if you want to take it further sir, add a health check step in your github action workflow after deployment so it auto rolls back if the container fails to start. saves a lot of headcahes in prod
Very elaborate and easy to adopt
Good Illustration Ernest,If you have some good compute on your VPS, you can check up on a self-managed instance of GitHub actions. You get the power of your actions without the SSH step.
You could be building images on GH Actions to save on VPS compute. Good stuff.