Hi @Law Chin Yeow , how did you deploy your Linux web application?
To allow your web app to access and read your configuration file, you need to place it in the appropriate location in your Azure web app. The location of the configuration file depends on the type of web app you have deployed.
Here are some options for where you can place external configuration files that need to be accessed by a WAR file deployed to Azure App Service on Linux:
- Create a /home/site/wwwroot/webapps/conf folder and put your config files there. This is a common location to externalize configs on Azure Web Apps.
- Set an environment variable like APP_CONFIG_PATH to point to the config folder, e.g. /home/site/config
- If your app reads a system environment variable like CATALINA_HOME, you can set this to point to a folder like /home/site/tomcat that contains your configs.
- Add your config files under D:\home\site\wwwroot and access them directly from the drive mount.
- For Spring apps, use /home/site/wwwroot/application-config folder for external props.
- Map an Azure file share to /home/site/wwwroot/configs to access files from shared storage.
- Use the /runtime/config folder which is protected from app changes.
Best,
Grace