Browse Source
Set environment variable for entire service endpoint. (#1328)
main-publicPoolNames
Phillip Hoff
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
src/Microsoft.Tye.Hosting/Model/Application.cs
|
|
@ -135,6 +135,13 @@ namespace Microsoft.Tye.Hosting.Model |
|
|
|
|
|
|
|
|
set($"SERVICE__{configName}__HOST", binding.Host); |
|
|
set($"SERVICE__{configName}__HOST", binding.Host); |
|
|
set($"{envName}_SERVICE_HOST", binding.Host); |
|
|
set($"{envName}_SERVICE_HOST", binding.Host); |
|
|
|
|
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(binding.Protocol) |
|
|
|
|
|
&& !String.IsNullOrEmpty(binding.Host) |
|
|
|
|
|
&& binding.Port != null) |
|
|
|
|
|
{ |
|
|
|
|
|
set($"{envName}_SERVICE_ENDPOINT", $"{binding.Protocol}://{binding.Host}:{binding.Port}"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|