Browse Source

Set environment variable for entire service endpoint. (#1328)

pull/1334/head
Phillip Hoff 5 years ago
committed by GitHub
parent
commit
447c5be275
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Microsoft.Tye.Hosting/Model/Application.cs

7
src/Microsoft.Tye.Hosting/Model/Application.cs

@ -135,6 +135,13 @@ namespace Microsoft.Tye.Hosting.Model
set($"SERVICE__{configName}__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}");
}
}
}

Loading…
Cancel
Save