@Ahmed AYADI , Apologies for the delay from over the weekend.
If you haven’t done already, I would suggest you to leverage Azure Startup (under ‘Configuration’ in the portal target, Startup command.
Typically, the easiest way to run database migrations with your database is directly from within the App Service container. Just as an example.
As a side note, these commands or scripts are executed after the built-in Docker container is started, but before your application code is started.
PHP 8 (NGINX) and Laravel Migrations
- You can use Kudu to view the logs -Linux/container apps: https://<Your-app-name>.scm.azurewebsites.net/api/logs/docker
- You may also leverage App Service diagnostics from Azure Portal for pointers. To access App Service diagnostics, navigate to your App Service app in the Azure portal.
- In the left navigation, click on Diagnose and solve problems – Checkout the tile for “Diagnostic Tools” and “Availability and Performance” > "Application Logs" title.
To isolate, you may use an FTP client/Kudu console to upload both your startup.sh script and your custom default.sh to the /home directory for your PHP App Service. As mentioned above >> Next, under ‘Configuration’ in the portal target /home/startup.sh (or whichever name you want startup script file).
Please let us know how it goes, I'll follow-up with you further.