Hello,
For your Web App to safely use secret from the key vault, you will need to use a managed identity.
After enabling the managed identity, you'll need to give this identity the necessary permissions on the key vault to get the secrets .
Instead of pulling them from environment variables as is standard in many Docker setups, you should modify your application code to fetch these credentials directly from the Key Vault at runtime using Azure's SDKs, which provide methods to interact with the Key Vault.
Since your application now gets these values from the Key Vault, there's no need to mention them in the Docker Compose file, enhancing your app's security.
Hope this helps
If you found this answer helpful, please consider marking it as accepted so that other users can easily find this topic.
Regards