How to deploy a node react app to Azure App Service?

Hi

Does anybody have an instructions on how to deploy a node react app to an Azure App Service?
I tried to follow and modify the Heroku and Fly.IO instructions in the template.
I have deployed the code manually from VS Code
Built it using npm in the app service editor console, it picked up the SHOPIFY_API_KEY from the config settings

I have added the SHOPIFY_API_SECRET as well, and also the SCOPES, HOST and BACKEND_PORT as well but I don’t know if they are necessary or correct.
I keep getting a 403 forbidden when I try to install the app to a store.

Thanks in advance

Have you found the solution? I also have the same question.

No, we went for a Docker container on AWS in the end
Basically just, set the env vars, copy the necessary files over and do a package manager install
Same concept, I guess

1 Like

Azure has documentation for setting up an app service with docker container: Deploy Azure app from Azure container registry - Azure | Microsoft Learn

Some issues that I ran into while uploading onto azure: Make sure the version of node on the application and the version you have set on your docker image are the same. After you deploy the application, the website won’t work until you set all your environment variables in the application settings found in configuration.

If you followed all the steps any other errors will be something wrong within the application files. If you’re having trouble identifying them, I would suggest trying to host on heroku to see if any errors pop up. If that didn’t find the issue then try deploying with the application files instead of using docker file. This link shows you how to do this: Quickstart: Create a Node.js web app - Azure App Service | Microsoft Learn. This helped me evaluate what bugs I had.

Side note: If you have any extensions included with your node application be sure to create a new separate folder with only the web contents. Since extensions require Ruby, app service won’t want to run the node app. You might not run into this issue, but I thought it was worth mentioning. Instead, you will want to deploy your extensions separately and these will be versioned and hosted by Shopify and can be found on the partner’s page.

1 Like