Browse Source

Fixes to dapr.exe cmdline invocation (#967)

* #995 removed unused arg & fixed multiple other cmdline args

* metrics-port restored
pull/981/head
Maciek Misztal 6 years ago
committed by GitHub
parent
commit
63b03f9206
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs

8
src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs

@ -107,7 +107,7 @@ namespace Microsoft.Tye.Extensions.Dapr
// These environment variables are replaced with environment variables // These environment variables are replaced with environment variables
// defined for this service. // defined for this service.
Args = $"run -app-id {project.Name} -app-port %APP_PORT% -dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% --placement-host-address localhost:{daprPlacementPort}", Args = $"run --app-id {project.Name} --app-port %APP_PORT% --dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% --placement-host-address localhost:{daprPlacementPort}",
}; };
// When running locally `-config` specifies a filename, not a configuration name. By convention // When running locally `-config` specifies a filename, not a configuration name. By convention
@ -117,7 +117,7 @@ namespace Microsoft.Tye.Extensions.Dapr
var configFile = Path.Combine(context.Application.Source.DirectoryName!, "components", $"{daprConfig}.yaml"); var configFile = Path.Combine(context.Application.Source.DirectoryName!, "components", $"{daprConfig}.yaml");
if (File.Exists(configFile)) if (File.Exists(configFile))
{ {
proxy.Args += $" -config \"{configFile}\""; proxy.Args += $" --config \"{configFile}\"";
} }
else else
{ {
@ -127,12 +127,12 @@ namespace Microsoft.Tye.Extensions.Dapr
if (config.Data.TryGetValue("log-level", out obj) && obj?.ToString() is string logLevel) if (config.Data.TryGetValue("log-level", out obj) && obj?.ToString() is string logLevel)
{ {
proxy.Args += $" -log-level {logLevel}"; proxy.Args += $" --log-level {logLevel}";
} }
if (config.Data.TryGetValue("components-path", out obj) && obj?.ToString() is string componentsPath) if (config.Data.TryGetValue("components-path", out obj) && obj?.ToString() is string componentsPath)
{ {
proxy.Args += $" -components-path {componentsPath}"; proxy.Args += $" --components-path {componentsPath}";
} }
// Add dapr proxy as a service available to everyone. // Add dapr proxy as a service available to everyone.
proxy.Dependencies.UnionWith(context.Application.Services.Select(s => s.Name)); proxy.Dependencies.UnionWith(context.Application.Services.Select(s => s.Name));

Loading…
Cancel
Save