azurenext.jsazure-devopsazure-webapps

Its possible deploy a hybrid NEXT.js application in Azure?


I'm trying to deploy a Next.js application who uses client and server components and also serve functions, however, when I try to deploy to Azure just don't work. The closest I came was on Static web apps and the pages were bugged, next auth didn't work, etc. Is there a way to do this correctly? I took care of the edge functions


Solution

  • I'm back here now with more knowledge to answer my own question, yes, it is possible to deploy a hybrid Next.js application in Azure. However, you need to do some extra work to get it to work, but Azure Web App has support for containerized applications, so all you need to do is containerize your Next.js application and upload the Web App as normal. It is therefore recommended that you “host” your container image in the Azure Container Registry, making it possible to create a CI/CD flow.

    You can learn more in this path:

    https://learn.microsoft.com/en-us/training/modules/deploy-run-container-app-service/