@Pavel Makul The issue you are facing is likely due to the way that Azure App Service handles environment variables in container mode. By default, Azure App Service sets environment variables for the container at startup time, which can cause delays in the environment variables being updated.
To fix this issue, you can try setting the environment variables for your container using the Azure App Service Application Settings. This will ensure that the environment variables are set before the container starts up, which should prevent delays in the environment variables being updated.
To set the environment variables using the Azure App Service Application Settings, follow these steps:
- Go to the Azure portal and navigate to your App Service.
- Click on the "Configuration" tab.
- Under "Application Settings", click on "New application setting".
- Enter the name and value of the environment variable you want to set.
- Click on "OK" to save the environment variable.
Repeat these steps for each environment variable you want to set.
Once you have set the environment variables using the Azure App Service Application Settings, you can remove the environment variables from your Dockerfile. This will ensure that the environment variables are set correctly at startup time.