My folder structure is like so:
-build
-unimportant stuff
-src
-scripts
-thirdParty
-knockout
-knockout.js
-jquery
-jquery.js
-business
-application.js
-index.html
So, basically I have my entire site source inside a "src" folder, when I deploy that to Azure I have to change the default pages configuration to "src/index.html" which seems to work. My problem is that my scripts are not being loaded.
I have my scripts referenced like so:
In my local environment this works great, but it Azure it is not able to access the scripts. It seems that even though I am trying to use relative path, Azure is trying to access the scripts from it's root directory which is one level below where the scripts are.
Does anyone know how to change the Azure Website root directory to be set as my "src" directory
In a computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the trunk of a tree, as the starting point where all branches originate from.
Using Azure App Service Deploy When creating an Azure DevOps pipeline, you can add the Azure App Service deploy task to deploy to such a web app. The default yaml configuration of this deployment task looks more or less as follows. There is no option on the yaml task to designate a specific subfolder to deploy to.
the solution is to go to "Configure" in the management of your Azure Website. In the "app settings" section add a key of "Project" and a value in my case of "./src" then trigger a deployment. now only the directory you specified will be deployed and it will be deployed as the root.
Full instructions can be found here: https://github.com/projectkudu/kudu/wiki/Customizing-deployments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With