Create a sample web app application in github repo, use the azure cli commands to deploy the web app content from github into azure porta i.e push the web app code from github to the deployment center of azure app service.
a. On the githuB page click on create new repo,
b. Enter the repo name, give the repo a description, select public, initialize by checking add a README file, then click on create repo.
c. Click on add-file to upload or create file html or php web files, index.php file added as shown below.
*Create resource group, web app plan and web app using the azure cli commands *
d. Create the resource group using the command below, after az login in your powershell: AppServiceRG
az group create --name AppServiceRG --location eastus
e. Create an app plan using the command: appservicePlan
az appservice plan create --name AppservicePlan --resource-group AppServiceRG
f. Create a web app using this command: Project10WebApp
az webapp create --name Project10WebApp --resource-group AppServiceRG --plan AppServicePlan
g. On the azure portal are the AppServiceRG, AppServicePlan and the Project10WebApp we created using the commands.
h. Deploy code from a public GitHub repository using the command below
az webapp deployment source config --name Project10WebApp --resource-group AppServiceRG --repo-url https://github.com/joseph4real/php-docs-hello-world --branch master --manual-integration
Note: the repo URL is from the githup repo.
i. Below are Pictures before deploying from github and after deploying form github, i.e. before running the deploy command and after running the deploy command.
NOTE: After deploy, one can comfirm from the picture, the source as external git and github repo URL.
J. Run the web app you created by opening the ULR or click the browser button.
k. Find the result below after opening the website.
With the above blog I have successfully deployed my web app from github repo into my azure portal.
Top comments (0)