as the title pretty much says it all, yarn next build/yarn build causes the website to return 'internal server error'. It is hosted on ubuntu with nginx, this is the one-liner I made and use to 'deploy'
yarn next build && pm2 delete WEBSITENAME && pm2 start yarn --name WEBSITENAME -- next start -p 3105 && pm2 save
It takes quite a while to build, during this 1/2 minutes whole website is down, any way I can avoid this? I was thinking having 2 folders running on different ports and switching them from nginx, but it just sounds like a hastle, for sure there must be a better way, please suggest!
Thanks!