I FIND A BETTER WAY DEPLOYING NEXTJS APP ON MY VPS.
We were burning CPU, RAM, and ~10GB of disk on our VPS every deploy building a large Next.js app directly on the server.
So we changed the model:
Build on GitHub Actions → push to GHCR → Dokploy pulls and runs.
No more yarn build on production. Deploys went from 15–20 minutes (when they didn’t fail) to seconds.
What changed: → Server = run containers, not compile code
→ Same image from staging (:release) to prod (:production)
→ Rollbacks = pull a previous tag
→ Freed ~10GB from old BuildKit cache alone
Same app. Cleaner ops.
If your VPS is still building Docker images on every push, you might not need a bigger server — you might need a different pipeline.