Reputation: 3663
I have a web site written in PHP that I am migrating to Azure. Currently I'm using Namecheap for hosting. My current set up is that I have two main folders in the project: public_html contains all the public facing HTML/PHP/etc files and resources which is not public-facing and contains my composer.json, misc helper PHP files, etc, etc. I maintain the project using git, and I have the repo cloned on the namecheap server with the public_html folder set as the web root of my site.
I used the following guide to help me set things up on Azure. (https://learn.microsoft.com/en-us/azure/app-service/quickstart-php?pivots=platform-linux) Basically I set up the azure server as a remote on my dev machine, and then when I've made changes to the dev machine I can just call git push azure main
and it'll deploy the code to the new azure set up. The issue I'm having is that I can't specify a different web root in Azure and it also needs to have the composer.json file in the root dir of the repo for it to build. So I have to move composer.json up a directory and reorganize things a bit, which works, but now all that stuff that was in the resources directory is exposed when I don't want it to be.
Is there a way I can deploy to azure without putting everything in the web root or a different strategy I should be using to organize my project files?
Upvotes: 1
Views: 96