Latest changes not reflecting in azure app service

Aditya Banerjee 0 Reputation points
2023-02-01T00:15:42.48+00:00

Hi, I am facing an issue where the latest changes are not reflecting in the azure app service after I push from the azure repo. I am using azure repo and do not have any pipeline setup on it. I am using Laravel application so trying to deploy it. I disconnect the old repo and I connect the latest repo but when I browse the old changes are reflecting in the azure app service.

Please assist.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,863 questions
{count} votes

3 answers

Sort by: Most helpful
  1. ajkuma 22,401 Reputation points Microsoft Employee
    2023-02-01T20:47:36.8466667+00:00

    @Aditya Banerjee ,

    Just to clarify, have you provisioned Windows or Linux variant of App Service?
    Do the latest changes reflect if you restart the WebApp?

    Just to highlight, Official support for PHP 8 will only be available on Linux, as a result of this App Service will only support PHP 8 on Apps Service Linux instances.

    I understand you don’t have any pipelines setup, test the app locally in production mode. App Service runs your app in production mode, so you need to make sure that your project works as expected in production mode locally.

    Since Laravel application lifecycle begins in the /public directory instead. The default PHP 8.0 container for App Service uses Nginx, which starts in the application's root directory. To change the site root, if you haven’t done already, you may change the Nginx configuration file in the PHP 8.0 container (/etc/nginx/sites-available/default).

    To customize your deployment, include a .deployment file in the repository root. For more information, see Customize deployments

    Also, check - NGINX Rewrite Rules for Azure App Service Linux PHP 8.x

    Kindly let us know, I'll follow-up with you further.

    0 comments No comments

  2. Aditya Banerjee 0 Reputation points
    2023-02-04T00:38:21.5766667+00:00

    Hi @ajkuma

    I want to deploy a Laravel application on the azure app service and I have a linux and I have connected my azure repo with the deployment centre. The issue I am facing is that deployment is now failing for me. I do not know why. Here is the logs

    Log Details

    Commit ID: c8160db4a1e930b61cef8b147b981807923b0953

    Time

    Activity

    Log

    11:21:41 AM

    Updating submodules.

    11:21:42 AM

    Preparing deployment for commit id 'c8160db4a1'.

    11:21:43 AM

    PreDeployment: context.CleanOutputPath False

    11:21:43 AM

    PreDeployment: context.OutputPath /home/site/wwwroot

    11:21:43 AM

    Repository path is /home/site/repository

    11:21:43 AM

    Running oryx build...

    Show Logs...

    11:21:58 AM

    11:21:58 AM

    Generating summary of Oryx build

    11:21:58 AM

    Parsing the build logs

    11:21:58 AM

    Found 0 issue(s)

    11:21:58 AM

    11:21:58 AM

    Build Summary :

    11:21:59 AM

    ===============

    11:21:59 AM

    Errors (0)

    11:21:59 AM

    Warnings (0)

    11:21:59 AM

    11:21:59 AM

    Deployment Failed. deployer = VSTS deploymentPath =

    In the Oryx the logs look like this -:

    Command: oryx build /home/site/repository -o /home/site/wwwroot --platform php --platform-version 8.0 -p virtualenv_name= --log-file /tmp/build-debug.log  -i /tmp/8db0645cae068ee | tee /tmp/oryx-build.log
    Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
    You can report issues at https://github.com/Microsoft/Oryx/issues
    
    Oryx Version: 0.2.20220812.1, Commit: cdf6b1bef165d05b94830e963646495967d938f4, ReleaseTagName: 20220812.1
    
    Build Operation ID: |71GKdXML1I8=.29b2a206_
    Repository Commit : c8160db4a1e930b61cef8b147b981807923b0953
    
    Detecting platforms...
    Detected following platforms:
      nodejs: 16.14.2
      php: 8.0.27
    
    Using intermediate directory '/tmp/8db0645cae068ee'.
    
    Copying files to the intermediate directory...
    Done in 1 sec(s).
    
    Source directory     : /tmp/8db0645cae068ee
    Destination directory: /home/site/wwwroot
    
    PHP executable: /tmp/oryx/platforms/php/8.0.27/bin/php
    Composer archive: /tmp/oryx/platforms/php-composer/2.0.8/composer.phar
    Running 'composer install --ignore-platform-reqs --no-interaction'...
    
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Package operations: 106 installs, 0 updates, 0 removals
        0 [>---------------------------]    0 [>---------------------------]  - Installing doctrine/inflector (2.0.6): Extracting archive
      - Installing doctrine/lexer (3.0.0): Extracting archive
      - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive
      - Installing webmozart/assert (1.11.0): Extracting archive
      - Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
      - Installing symfony/deprecation-contracts (v3.2.0): Extracting archive
      - Installing psr/container (2.0.2): Extracting archive
      - Installing fakerphp/faker (v1.21.0): Extracting archive
      - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
      - Installing symfony/http-foundation (v6.2.6): Extracting archive
      - Installing fruitcake/php-cors (v1.2.0): Extracting archive
      - Installing psr/http-message (1.0.1): Extracting archive
      - Installing psr/http-client (1.0.1): Extracting archive
      - Installing ralouphie/getallheaders (3.0.3): Extracting archive
      - Installing psr/http-factory (1.0.1): Extracting archive
      - Installing guzzlehttp/psr7 (2.4.3): Extracting archive
      - Installing guzzlehttp/promises (1.5.2): Extracting archive
      - Installing guzzlehttp/guzzle (7.5.0): Extracting archive
      - Installing laravel/pint (v1.4.1): Extracting archive
      - Installing voku/portable-ascii (2.0.1): Extracting archive
      - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive
      - Installing phpoption/phpoption (1.9.0): Extracting archive
      - Installing graham-campbell/result-type (v1.1.0): Extracting archive
      - Installing vlucas/phpdotenv (v5.5.0): Extracting archive
      - Installing symfony/css-selector (v6.2.5): Extracting archive
      - Installing tijsverkoyen/css-to-inline-styles (2.2.6): Extracting archive
      - Installing symfony/var-dumper (v6.2.5): Extracting archive
      - Installing symfony/polyfill-uuid (v1.27.0): Extracting archive
      - Installing symfony/uid (v6.2.5): Extracting archive
      - Installing symfony/routing (v6.2.5): Extracting archive
      - Installing symfony/process (v6.2.5): Extracting archive
      - Installing symfony/polyfill-php72 (v1.27.0): Extracting archive
      - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
      - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive
      - Installing symfony/mime (v6.2.5): Extracting archive
      - Installing symfony/service-contracts (v3.2.0): Extracting archive
      - Installing psr/event-dispatcher (1.0.0): Extracting archive
      - Installing symfony/event-dispatcher-contracts (v3.2.0): Extracting archive
      - Installing symfony/event-dispatcher (v6.2.5): Extracting archive
      - Installing psr/log (3.0.0): Extracting archive
      - Installing egulias/email-validator (4.0.1): Extracting archive
      - Installing symfony/mailer (v6.2.5): Extracting archive
      - Installing symfony/error-handler (v6.2.5): Extracting archive
      - Installing symfony/http-kernel (v6.2.6): Extracting archive
      - Installing symfony/finder (v6.2.5): Extracting archive
      - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
      - Installing symfony/string (v6.2.5): Extracting archive
      - Installing symfony/console (v6.2.5): Extracting archive
      - Installing ramsey/collection (2.0.0): Extracting archive
      - Installing brick/math (0.10.2): Extracting archive
      - Installing ramsey/uuid (4.7.3): Extracting archive
      - Installing psr/simple-cache (3.0.0): Extracting archive
      - Installing nunomaduro/termwind (v1.15.0): Extracting archive
      - Installing symfony/translation-contracts (v3.2.0): Extracting archive
      - Installing symfony/translation (v6.2.5): Extracting archive
      - Installing nesbot/carbon (2.66.0): Extracting archive
      - Installing monolog/monolog (2.8.0): Extracting archive
      - Installing league/mime-type-detection (1.11.0): Extracting archive
      - Installing league/flysystem (3.12.2): Extracting archive
      - Installing nette/utils (v4.0.0): Extracting archive
      - Installing nette/schema (v1.2.3): Extracting archive
      - Installing dflydev/dot-access-data (v3.0.2): Extracting archive
      - Installing league/config (v1.2.0): Extracting archive
      - Installing league/commonmark (2.3.8): Extracting archive
      - Installing laravel/serializable-closure (v1.3.0): Extracting archive
      - Installing laravel/framework (v9.50.2): Extracting archive
      - Installing laravel/sail (v1.19.0): Extracting archive
      - Installing laravel/sanctum (v3.2.1): Extracting archive
      - Installing nikic/php-parser (v4.15.3): Extracting archive
      - Installing psy/psysh (v0.11.12): Extracting archive
      - Installing laravel/tinker (v2.8.0): Extracting archive
      - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
      - Installing mockery/mockery (1.5.1): Extracting archive
      - Installing filp/whoops (2.14.6): Extracting archive
      - Installing nunomaduro/collision (v6.4.0): Extracting archive
      - Installing sebastian/version (3.0.2): Extracting archive
      - Installing sebastian/type (3.2.0): Extracting archive
      - Installing sebastian/resource-operations (3.0.3): Extracting archive
      - Installing sebastian/recursion-context (4.0.4): Extracting archive
      - Installing sebastian/object-reflector (2.0.4): Extracting archive
      - Installing sebastian/object-enumerator (4.0.4): Extracting archive
      - Installing sebastian/global-state (5.0.5): Extracting archive
      - Installing sebastian/exporter (4.0.5): Extracting archive
      - Installing sebastian/environment (5.1.4): Extracting archive
      - Installing sebastian/diff (4.0.4): Extracting archive
      - Installing sebastian/comparator (4.0.8): Extracting archive
      - Installing sebastian/code-unit (1.0.8): Extracting archive
      - Installing sebastian/cli-parser (1.0.1): Extracting archive
      - Installing phpunit/php-timer (5.0.3): Extracting archive
      - Installing phpunit/php-text-template (2.0.4): Extracting archive
      - Installing phpunit/php-invoker (3.1.1): Extracting archive
      - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
      - Installing theseer/tokenizer (1.2.1): Extracting archive
      - Installing sebastian/lines-of-code (1.0.3): Extracting archive
      - Installing sebastian/complexity (2.0.2): Extracting archive
      - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
      - Installing phpunit/php-code-coverage (9.2.24): Extracting archive
      - Installing phar-io/version (3.2.1): Extracting archive
      - Installing phar-io/manifest (2.0.3): Extracting archive
      - Installing myclabs/deep-copy (1.11.0): Extracting archive
      - Installing doctrine/instantiator (2.0.0): Extracting archive
      - Installing phpunit/phpunit (9.5.28): Extracting archive
      - Installing spatie/backtrace (1.2.1): Extracting archive
      - Installing spatie/flare-client-php (1.3.5): Extracting archive
      - Installing spatie/ignition (1.4.3): Extracting archive
      - Installing spatie/laravel-ignition (1.6.4): Extracting archive
      0/97 [>---------------------------]   0%
     10/97 [==>-------------------------]  10%
     18/97 [=====>----------------------]  18%
     28/97 [========>-------------------]  28%
     38/97 [==========>-----------------]  39%
     43/97 [============>---------------]  44%
     53/97 [===============>------------]  54%
     61/97 [=================>----------]  62%
     69/97 [===================>--------]  71%
     79/97 [======================>-----]  81%
     89/97 [=========================>--]  91%
     93/97 [==========================>-]  95%
     97/97 [============================] 100%Generating optimized autoload files
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    
    Parse error: syntax error, unexpected identifier "AnsiColorMode" in /tmp/8db0645cae068ee/vendor/symfony/console/Output/AnsiColorMode.php on line 20
    Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
    Installing dependencies from lock file (including require-dev)\nVerifying lock file contents can be installed on current platform.\nPackage operations: 106 installs, 0 updates, 0 removals\n    0 [>---------------------------]    0 [>---------------------------]  - Installing doctrine/inflector (2.0.6): Extracting archive\n  - Installing doctrine/lexer (3.0.0): Extracting archive\n  - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive\n  - Installing webmozart/assert (1.11.0): Extracting archive\n  - Installing dragonmantank/cron-expression (v3.3.2): Extracting archive\n  - Installing symfony/deprecation-contracts (v3.2.0): Extracting archive\n  - Installing psr/container (2.0.2): Extracting archive\n  - Installing fakerphp/faker (v1.21.0): Extracting archive\n  - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive\n  - Installing symfony/http-foundation (v6.2.6): Extracting archive\n  - Installing fruitcake/php-cors (v1.2.0): Extracting archive\n  - Installing psr/http-message (1.0.1): Extracting archive\n  - Installing psr/http-client (1.0.1): Extracting archive\n  - Installing ralouphie/getallheaders (3.0.3): Extracting archive\n  - Installing psr/http-factory (1.0.1): Extracting archive\n  - Installing guzzlehttp/psr7 (2.4.3): Extracting archive\n  - Installing guzzlehttp/promises (1.5.2): Extracting archive\n  - Installing guzzlehttp/guzzle (7.5.0): Extracting archive\n  - Installing laravel/pint (v1.4.1): Extracting archive\n  - Installing voku/portable-ascii (2.0.1): Extracting archive\n  - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive\n  - Installing phpoption/phpoption (1.9.0): Extracting archive\n  - Installing graham-campbell/result-type (v1.1.0): Extracting archive\n  - Installing vlucas/phpdotenv (v5.5.0): Extracting archive\n  - Installing symfony/css-selector (v6.2.5): Extracting archive\n  - Installing tijsverkoyen/css-to-inline-styles (2.2.6): Extracting archive\n  - Installing symfony/var-dumper (v6.2.5): Extracting archive\n  - Installing symfony/polyfill-uuid (v1.27.0): Extracting archive\n  - Installing symfony/uid (v6.2.5): Extracting archive\n  - Installing symfony/routing (v6.2.5): Extracting archive\n  - Installing symfony/process (v6.2.5): Extracting archive\n  - Installing symfony/polyfill-php72 (v1.27.0): Extracting archive\n  - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive\n  - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive\n  - Installing symfony/mime (v6.2.5): Extracting archive\n  - Installing symfony/service-contracts (v3.2.0): Extracting archive\n  - Installing psr/event-dispatcher (1.0.0): Extracting archive\n  - Installing symfony/event-dispatcher-contracts (v3.2.0): Extracting archive\n  - Installing symfony/event-dispatcher (v6.2.5): Extracting archive\n  - Installing psr/log (3.0.0): Extracting archive\n  - Installing egulias/email-validator (4.0.1): Extracting archive\n  - Installing symfony/mailer (v6.2.5): Extracting archive\n  - Installing symfony/error-handler (v6.2.5): Extracting archive\n  - Installing symfony/http-kernel (v6.2.6): Extracting archive\n  - Installing symfony/finder (v6.2.5): Extracting archive\n  - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive\n  - Installing symfony/string (v6.2.5): Extracting archive\n  - Installing symfony/console (v6.2.5): Extracting archive\n  - Installing ramsey/collection (2.0.0): Extracting archive\n  - Installing brick/math (0.10.2): Extracting archive\n  - Installing ramsey/uuid (4.7.3): Extracting archive\n  - Installing psr/simple-cache (3.0.0): Extracting archive\n  - Installing nunomaduro/termwind (v1.15.0): Extracting archive\n  - Installing symfony/translation-contracts (v3.2.0): Extracting archive\n  - Installing symfony/translation (v6.2.5): Extracting archive\n  - Installing nesbot/carbon (2.66.0): Extracting archive\n  - Installing monolog/monolog (2.8.0): Extracting archive\n  - Installing league/mime-type-detection (1.11.0): Extracting archive\n  - Installing league/flysystem (3.12.2): Extracting archive\n  - Installing nette/utils (v4.0.0): Extracting archive\n  - Installing nette/schema (v1.2.3): Extracting archive\n  - Installing dflydev/dot-access-data (v3.0.2): Extracting archive\n  - Installing league/config (v1.2.0): Extracting archive\n  - Installing league/commonmark (2.3.8): Extracting archive\n  - Installing laravel/serializable-closure (v1.3.0): Extracting archive\n  - Installing laravel/framework (v9.50.2): Extracting archive\n  - Installing laravel/sail (v1.19.0): Extracting archive\n  - Installing laravel/sanctum (v3.2.1): Extracting archive\n  - Installing nikic/php-parser (v4.15.3): Extracting archive\n  - Installing psy/psysh (v0.11.12): Extracting archive\n  - Installing laravel/tinker (v2.8.0): Extracting archive\n  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive\n  - Installing mockery/mockery (1.5.1): Extracting archive\n  - Installing filp/whoops (2.14.6): Extracting archive\n  - Installing nunomaduro/collision (v6.4.0): Extracting archive\n  - Installing sebastian/version (3.0.2): Extracting archive\n  - Installing sebastian/type (3.2.0): Extracting archive\n  - Installing sebastian/resource-operations (3.0.3): Extracting archive\n  - Installing sebastian/recursion-context (4.0.4): Extracting archive\n  - Installing sebastian/object-reflector (2.0.4): Extracting archive\n  - Installing sebastian/object-enumerator (4.0.4): Extracting archive\n  - Installing sebastian/global-state (5.0.5): Extracting archive\n  - Installing sebastian/exporter (4.0.5): Extracting archive\n  - Installing sebastian/environment (5.1.4): Extracting archive\n  - Installing sebastian/diff (4.0.4): Extracting archive\n  - Installing sebastian/comparator (4.0.8): Extracting archive\n  - Installing sebastian/code-unit (1.0.8): Extracting archive\n  - Installing sebastian/cli-parser (1.0.1): Extracting archive\n  - Installing phpunit/php-timer (5.0.3): Extracting archive\n  - Installing phpunit/php-text-template (2.0.4): Extracting archive\n  - Installing phpunit/php-invoker (3.1.1): Extracting archive\n  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive\n  - Installing theseer/tokenizer (1.2.1): Extracting archive\n  - Installing sebastian/lines-of-code (1.0.3): Extracting archive\n  - Installing sebastian/complexity (2.0.2): Extracting archive\n  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive\n  - Installing phpunit/php-code-coverage (9.2.24): Extracting archive\n  - Installing phar-io/version (3.2.1): Extracting archive\n  - Installing phar-io/manifest (2.0.3): Extracting archive\n  - Installing myclabs/deep-copy (1.11.0): Extracting archive\n  - Installing doctrine/instantiator (2.0.0): Extracting archive\n  - Installing phpunit/phpunit (9.5.28): Extracting archive\n  - Installing spatie/backtrace (1.2.1): Extracting archive\n  - Installing spatie/flare-client-php (1.3.5): Extracting archive\n  - Installing spatie/ignition (1.4.3): Extracting archive\n  - Installing spatie/laravel-ignition (1.6.4): Extracting archive\n  0/97 [>---------------------------]   0%\n 10/97 [==>-------------------------]  10%\n 18/97 [=====>----------------------]  18%\n 28/97 [========>-------------------]  28%\n 38/97 [==========>-----------------]  39%\n 43/97 [============>---------------]  44%\n 53/97 [===============>------------]  54%\n 61/97 [=================>----------]  62%\n 69/97 [===================>--------]  71%\n 79/97 [======================>-----]  81%\n 89/97 [=========================>--]  91%\n 93/97 [==========================>-]  95%\n 97/97 [============================] 100%Generating optimized autoload files\n> Illuminate\Foundation\ComposerScripts::postAutoloadDump\n> @php artisan package:discover --ansi\nScript @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255\n/bin/bash -c "oryx build /home/site/repository -o /home/site/wwwroot --platform php --platform-version 8.0 -p virtualenv_name= --log-file /tmp/build-debug.log  -i /tmp/8db0645cae068ee | tee /tmp/oryx-build.log ; exit $PIPESTATUS "
    

  3. Khurram Rahim 1,841 Reputation points
    2023-02-06T19:51:11.4466667+00:00

    It sounds like you are facing an issue with deploying the latest changes to your Azure App Service. Here are a few steps that might help resolve the issue:

    1. Check your deployment source: Make sure that you have connected the latest repository in the Azure App Service and that you have selected the correct branch that contains the latest changes.
    2. Clear the cache: Try clearing the cache in the Azure App Service, as it may still be using the old files. You can clear the cache by using the Azure Portal, the Azure CLI, or by creating a custom deployment script.
    3. Restart the App Service: Sometimes, restarting the Azure App Service can help resolve issues with deployment. You can restart the App Service from the Azure Portal or the Azure CLI.
    4. Verify the deployment logs: Check the deployment logs in the Azure App Service for any errors or warnings. This can give you more information about what is causing the issue.
    5. Re-deploy the App Service: If none of the above steps work, you can try re-deploying the App Service from your latest repository. Make sure to disconnect the old repository and connect the latest repository again before re-deploying.

    By following these steps, you should be able to resolve the issue and deploy the latest changes to your Azure App Service.