Browse Source
#380 make running proxy container be logged at DEBUG level (#828)
* #380 make running proxy container be logged at DEBUG level
* Update DockerRunner.cs
* Update DockerRunInfo.cs
* Update DockerRunner.cs
* Update DockerRunInfo.cs
Co-authored-by: PBA\ShevchukPA <ShevchukPA@pba.su>
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
pull/840/head
newuser
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
14 additions and
2 deletions
-
src/Microsoft.Tye.Hosting/DockerRunner.cs
-
src/Microsoft.Tye.Hosting/Model/DockerRunInfo.cs
|
|
|
@ -66,7 +66,8 @@ namespace Microsoft.Tye.Hosting |
|
|
|
{ |
|
|
|
WorkingDirectory = "/app", |
|
|
|
NetworkAlias = service.Description.Name, |
|
|
|
Private = true |
|
|
|
Private = true, |
|
|
|
IsProxy = true |
|
|
|
}; |
|
|
|
var proxyLocation = Path.GetDirectoryName(typeof(Microsoft.Tye.Proxy.Program).Assembly.Location); |
|
|
|
proxyContainer.VolumeMappings.Add(new DockerVolume(proxyLocation, name: null, target: "/app")); |
|
|
|
@ -295,7 +296,14 @@ namespace Microsoft.Tye.Hosting |
|
|
|
|
|
|
|
var command = $"run -d {workingDirectory} {volumes} {environmentArguments} {portString} --name {replica} --restart=unless-stopped {dockerImage} {docker.Args ?? ""}"; |
|
|
|
|
|
|
|
_logger.LogInformation("Running image {Image} for {Replica}", docker.Image, replica); |
|
|
|
if (!docker.IsProxy) |
|
|
|
{ |
|
|
|
_logger.LogInformation("Running image {Image} for {Replica}", docker.Image, replica); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_logger.LogDebug("Running proxy image {Image} for {Replica}", docker.Image, replica); |
|
|
|
} |
|
|
|
|
|
|
|
service.Logs.OnNext($"[{replica}]: docker {command}"); |
|
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,10 @@ namespace Microsoft.Tye.Hosting.Model |
|
|
|
Args = args; |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsProxy { get; set; } |
|
|
|
|
|
|
|
public bool Private { get; set; } |
|
|
|
|
|
|
|
public bool IsAspNet { get; set; } |
|
|
|
|
|
|
|
public string? NetworkAlias { get; set; } |
|
|
|
@ -26,6 +29,7 @@ namespace Microsoft.Tye.Hosting.Model |
|
|
|
public List<DockerVolume> VolumeMappings { get; } = new List<DockerVolume>(); |
|
|
|
|
|
|
|
public string? Args { get; } |
|
|
|
|
|
|
|
public Dictionary<string, string> BuildArgs { get; set; } = new Dictionary<string, string>(); |
|
|
|
|
|
|
|
public string Image { get; } |
|
|
|
|