Wrong path for Startup Command?
reksc opened this issue · comments
Hi, I'm deploying a php web app from Github via Kudu. I need to add additional server
definition to nginx sites-enabled
directory.
I use the Startup Command attribute of container's general configuration in Azure Portal.
I tried with several paths, including:
/home/site/repository/scripts/update_nginx_conf.sh
scripts/update_nginx_conf.sh
... where <repo_root>/scripts/update_nginx_conf.sh
definitely exists.
Each time I get /opt/startup/startup.sh: <path>/scripts/update_nginx_conf.sh: not found
What should be the correct path to input in the text field?
/home/site/wwwroot
is the root of your project. Can you try that with the path to the update_nginx_conf.sh
from the root?
Thanks for responding.
Well, your approach might work, but the question is about how the lifecycle looks like, which is - as far as I see - not documented anywhere. The correct approach should fire the most recent version of the command, so the one that comes with the new deployment.
So, where the newest file is located at the point of triggering the command? In /home/site/repository
, which is empty after the deployment is finished, or in the wwwroot
you mentioned?
I was following the article from here: https://www.schakko.de/2021/09/08/deploying-php-8-0-applications-with-azure-app-service/ - have a quick look and you will know why I had these doubts.
Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano
Azure App Service