diff --git a/samples/dapr/orders/orders.csproj b/samples/dapr/orders/orders.csproj
index 724cd0e9..3b072fc1 100644
--- a/samples/dapr/orders/orders.csproj
+++ b/samples/dapr/orders/orders.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/samples/dapr/products/products.csproj b/samples/dapr/products/products.csproj
index 724cd0e9..3b072fc1 100644
--- a/samples/dapr/products/products.csproj
+++ b/samples/dapr/products/products.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/samples/dapr/store/store.csproj b/samples/dapr/store/store.csproj
index e0a411ff..271f1d9b 100644
--- a/samples/dapr/store/store.csproj
+++ b/samples/dapr/store/store.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/samples/dapr/tye.yaml b/samples/dapr/tye.yaml
index 8d4dc716..d89e15ed 100644
--- a/samples/dapr/tye.yaml
+++ b/samples/dapr/tye.yaml
@@ -16,7 +16,9 @@ extensions:
# a file on disk when running locally at `./components/myconfig.yaml`
#
# config: myconfig
-
+
+ # components-path configures the components path of the dapr sidecard
+ components-path: "./components/"
services:
- name: orders
project: orders/orders.csproj
@@ -32,4 +34,11 @@ services:
- name: redis
image: redis
bindings:
- - port: 6379
\ No newline at end of file
+ - port: 6379
+# To ensure that your are running a dapr placement container with the right binding port.
+# (50005 as HostPort)
+- name: placement
+ image: daprio/dapr
+ args: ./placement
+ bindings:
+ - port: 50005
diff --git a/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs b/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs
index eccc1707..2b8c6edf 100644
--- a/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs
+++ b/src/Microsoft.Tye.Extensions/Dapr/DaprExtension.cs
@@ -31,7 +31,7 @@ namespace Microsoft.Tye.Extensions.Dapr
}
// See https://github.com/dotnet/tye/issues/260
- //
+ //
// Currently the pub-sub pattern does not work when you have multiple replicas. Each
// daprd instance expects that it has a single application to talk to. So if you're using
// pub-sub this means that you'll won't get some messages.
@@ -71,6 +71,10 @@ namespace Microsoft.Tye.Extensions.Dapr
proxy.Args += $" -log-level {logLevel}";
}
+ if (config.Data.TryGetValue("components-path", out obj) && obj?.ToString() is string componentsPath)
+ {
+ proxy.Args += $" -components-path {componentsPath}";
+ }
// Add dapr proxy as a service available to everyone.
proxy.Dependencies.UnionWith(context.Application.Services.Select(s => s.Name));