@woosoek jang , Based on my understanding of your question description, I'm highlighting the App Service on Linux container (startup process) | it runs the following steps outline below. Sorry for the long post.
App Service uses the Gunicorn web server by default, which must be able to find your app object or wsgi.py folder. If needed, you can always customize the startup command.
- Use a custom startup command, if provided. In Azure portal: select the app's Configuration page, then select General settings. Add Startup Command
- Check for the existence of a Django app, and launch Gunicorn for it if detected or check for the existence of a Flask app, and launch Gunicorn for it if detected.
- If no other app is found, start a default app that's built into the container.
In the App Service, app settings function as variables transmitted as environment variables to the application code. For Linux applications and custom containers, App Service delivers app settings to the container by utilizing the --env
flag to establish the environment variable within the container. Regardless of the scenario, these settings are introduced into your application environment during startup. Any modifications to app settings, whether they involve addition, removal, or editing, prompt an app restart in the App Service.
Just to highlight, if you are leveraging App Service custom container, App Service has no control about which port your container listens on.
In this case, you need to set the WEBSITES_PORT
app setting to the port number, and App Service forwards requests to that port in the container. The WEBSITES_PORT
app setting does not have any effect within the container, and you can’t access it as an environment variable within the container.
Kindly checkout this doc section Configure a Linux Python app for Azure App Service | Container characteristics for more details.
--
If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will help users to find the answers quickly.