Skip to content

StephanieOrganization/php-composer-sample-azure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Composer sample on Azure

This sample installs monolog & php-timer with composer.

App Service Linux Deployment (Use Linux Branch)

⚠️ Remove the ".deployment" file with Linux deployments to avoid conflicting build scripts.

If you deploy your app using zip deploy with "SCM_DO_BUILD_DURING_DEPLOYMENT" to "true", the Oryx build automation steps through the following sequence: Run custom script if specified by PRE_BUILD_SCRIPT_PATH. Run php composer.phar install. Run custom script if specified by POST_BUILD_SCRIPT_PATH.

https://github.com/microsoft/Oryx/blob/master/doc/runtimes/php.md

App Service Windows Deployment (Main Branch)

Running composer & on Windows requires the additional files in your repository.

  • .deployment
  • deploy.sh
  • composer.phar

Set the App Setting "SCM_DO_BUILD_DURING_DEPLOYMENT" to "true" to build the composer dependencies during deployment

Enable SCM_DO_BUILD_DURING_DEPLOYMENT with Azure CLI

az webapp config appsettings set --resource-group <group-name> --name <app-name> --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true

Zip Deploy with Azure CLI

az webapp deployment source config-zip --resource-group <group-name> --name <app-name> --src clouddrive/<filename>.zip

Reference: https://docs.microsoft.com/en-us/azure/app-service/configure-language-php?pivots=platform-windows#run-composer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 89.3%
  • PHP 10.7%