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.