Hello,
Till now I have succeeded to make an ARM template for a web app, using the extension MSDeploy (with packageUri zip in an azure blob storage).
Inside the package zip file, I have a create-react-app with all files (package.json, node_modules, src, ...), but without the build folder.
But my problem is that I would like to build the application on the azure web app, in order to load some environment variables from the server app settings (if I build the application locally it cannot see the server app settings).
So here I am -> how in ARM template indicate that after unzip on wwwroot, the application must be build.
(until now I have used the .deployment file with SCM_DO_BUILD_DURING_DEPLOYMENT=true, but that file has no effect using ARM template to create the resource, no build folder is created)
other things I have tried :
- putting SCM_DO_BUILD_DURING_DEPLOYMENT in appsettings (it was indicated somewhere to do that for azure functions, but here for webapp seems useless)
- try to run the webapp with "npm start" command because this would avoid the building problem, but for create-react-app I have not succeeded to start the webapp server like that yet
- looking at new Microsoft.Resources/deploymentScripts, maybe could do the build if it cannot be configured in Microsoft.Web/sites ARM
Thanks for your help,
laurent