Description
Improvement two-fold:
- Update docs to show how to attach and launch container in Azure without building a wrapping container around DAB's published container as is present in these two tutorials:
- https://learn.microsoft.com/en-us/azure/data-api-builder/deployment/how-to-publish-container-instances
- This tutorial wraps dab in another container and passes command line arg --config-file to instruct dab to look for config file in mounted fileshare containing config
- https://learn.microsoft.com/en-us/azure/data-api-builder/tutorial-deploy-container-app-cli
- This tutorial wraps DAB CLI download and install into a container which wraps DAB's published container image. This doesn't work in environments which have limited to no network connectivity. DAB config should be generated outside of the container, tracked in source control and mapped to the container via a storage account to be consistent with other tutorial.
- https://learn.microsoft.com/en-us/azure/data-api-builder/deployment/how-to-publish-container-instances
In order to allow dab to not need a new container created to wrap the published image, we can advise how to update the hosting mechanism's "AppSettings.json" equivalent. e.g. with Azure Web Apps: use https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=cli#configure-app-settings
) az webapp config appsettings set --settings "ConfigFileName=/Config/dab-config.json"
The setting that dab looks for is ConfigFileName
. which can be a relative or full path.
DAB already allows users to pass a command line argument --ConfigFileName /cfg/dab-config.json
, but if we have a container that is already created, we may need to enable dab to look at an environment variable which specifies the full path of the config. (this seems like duplicate functionality of appsettings though)