0

I am developing a PHP-Laravel Web App in Microsoft Azure Cloud. I set up a Local Git in the cloud for version control. I am also using PHP Storm by JetBrains as the IDE.

Each time I push files from my computer to azure, git performs some operations which delay my deployment. Even if I change a single file it will take around a minute to finish. I am new to Laravel and Composer so I was wondering if it is a normal thing to do or is it my mistake?

Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.35 KiB | 0 bytes/s, done.
Total 7 (delta 6), reused 0 (delta 0)
remote: Updating branch 'master'.        
remote: Updating submodules.        
remote: Preparing deployment for commit id '0f7a0fa743'.        
remote: Running custom deployment command...         
remote: Running deployment command...        
remote: Install Dependencies with Composer        
remote: Loading composer repositories with package information        
remote: Installing dependencies from lock file        
remote: Nothing to install or update        
remote: Generating optimized autoload files        
remote: ...........................        
remote: > Illuminate\Foundation\ComposerScripts::postInstall        
remote: > php artisan optimize        
remote: ..        
remote: Generating optimized class loader        
remote: ..............................        
remote: Handling Basic Web Site deployment.        
remote: ...        
remote: KuduSync.NET from: 'D:\home\repository' to: 'D:\home\site'        
remote: Copying file: '.idea\workspace.xml'        
remote: Copying file: 'app\Http\routes.php'        
remote: Copying file: 'vendor\autoload.php'        
remote: Copying file: 'vendor\composer\autoload_classmap.php'        
remote: Copying file: 'vendor\composer\autoload_files.php'        
remote: Copying file: 'vendor\composer\autoload_namespaces.php'        
remote: Copying file: 'vendor\composer\autoload_psr4.php'        
remote: Copying file: 'vendor\composer\autoload_real.php'        
remote: Copying file: 'vendor\composer\autoload_static.php'        
remote: Copying file: 'vendor\composer\ClassLoader.php'        
remote: Copying file: 'vendor\composer\installed.json'        
remote: Copying file: 'vendor\composer\LICENSE'        
remote: Finished successfully.        
remote: Running post deployment command(s)...        
remote: Deployment successful.  
3
  • 1
    i think thats natural, and i use azure too with alravel, but i prefer to push to github first then from github to azure Commented May 27, 2016 at 0:42
  • How do you do that? Commented May 27, 2016 at 0:57
  • 1
    i create an account on github then i push my changes to github (you can google how) then i go to azure and setup my deployment source as github, i authorize azure on github , then wait for deployment , anyway this will not save you time or anything ( its just the way i like to do it). does your website works fine after deploying? Commented May 27, 2016 at 1:02

1 Answer 1

1

When you deploy your PHP application to Azure App Services via Git. The deployment task not only upload and copy the code scripts on the root directory on Azure, but also will run composer commands if you have composer.json configuration file on your root directory and enabled the composer extension on Azure App Services.

It will run composer install, which will install the dependencies and run the custom commands set in scripts section.

So it will take time.

Azure App Services as a PaaS for hosting production applications, you can push your code to Azure after you have finished a stage of developing work.

Meanwhile, you can try the suggestion provided by @Achraf Khouadja, leverage the GitHub repository as a middle layer. with which, you can only upload your codes to GitHub, and Azure fabric will sync the code and run the deployment task automatically.

You will not need to wait the response in your IDE, it will save your time.

Sign up to request clarification or add additional context in comments.

1 Comment

Nice explanation. Thanks for your time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.