Replace environment variable HOSTNAME with CONTAINER_APP_REPLICA_NAME.
Description
In new ACA Environment with workload profiles, using the Consumption profile, HOSTNAME does not appear to exist as an environment variable anymore - thus the application cannot start. However, the env variable CONTAINER_APP_REPLICA_NAME exists in both classic ACA Environment (Consumption) and in new workload profiles (Dedicated + Consumption). So this change should be backwards compatible as well.
Also, it makes more sense in this context and uses the same standard as the other Container App metadata env variables that are fetched.
Purpose
This pull request is a:
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
Replace environment variable HOSTNAME with CONTAINER_APP_REPLICA_NAME.
Description
In new ACA Environment with workload profiles, using the Consumption profile, HOSTNAME does not appear to exist as an environment variable anymore - thus the application cannot start. However, the env variable CONTAINER_APP_REPLICA_NAME exists in both classic ACA Environment (Consumption) and in new workload profiles (Dedicated + Consumption). So this change should be backwards compatible as well.
Also, it makes more sense in this context and uses the same standard as the other Container App metadata env variables that are fetched.
Purpose
This pull request is a:
Checklist