Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daprdocs/content/en/concepts/dapr-services/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ For a detailed list of all available arguments run `daprd --help` or see this [t
daprd --app-id --app-port 5000
```

3. If you are using several custom components and want to specify the location of the component definition files, use the `--components-path` argument:
3. If you are using several custom components and want to specify the location of the component definition files, use the `--resources-path` argument:

```bash
daprd --app-id myapp --components-path <PATH-TO-COMPONENTS-FILES>
daprd --app-id myapp --resources-path <PATH-TO-RESOURCES-FILES>
```

4. Enable collection of Prometheus metrics while running your app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create a new binding component named `checkout`. Within the `metadata` section,

{{% codetab %}}

Use the `--components-path` flag with `dapr run` to point to your custom components directory.
Use the `--resources-path` flag with `dapr run` to point to your custom resources directory.

```yaml
apiVersion: dapr.io/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Create a new binding component named `checkout`. Within the `metadata` section,

{{% codetab %}}

Use the `--components-path` flag with the `dapr run` command to point to your custom components directory.
Use the `--resources-path` flag with the `dapr run` command to point to your custom resources directory.

```yaml
apiVersion: dapr.io/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ asyncio.run(executeConfiguration())
```

```bash
dapr run --app-id orderprocessing --components-path components/ -- python3 OrderProcessingService.py
dapr run --app-id orderprocessing --resources-path components/ -- python3 OrderProcessingService.py
```

{{% /codetab %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,46 +63,46 @@ scopes:
- checkout
```

You can override this file with another [pubsub component]({{< ref setup-pubsub >}}) by creating a components directory (in this example, `myComponents`) containing the file and using the flag `--components-path` with the `dapr run` CLI command.
You can override this file with another [pubsub component]({{< ref setup-pubsub >}}) by creating a components directory (in this example, `myComponents`) containing the file and using the flag `--resources-path` with the `dapr run` CLI command.

{{< tabs Dotnet Java Python Go Javascript >}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- dotnet run
dapr run --app-id myapp --resources-path ./myComponents -- dotnet run
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run
dapr run --app-id myapp --resources-path ./myComponents -- mvn spring-boot:run
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- python3 app.py
dapr run --app-id myapp --resources-path ./myComponents -- python3 app.py
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- go run app.go
dapr run --app-id myapp --resources-path ./myComponents -- go run app.go
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- npm start
dapr run --app-id myapp --resources-path ./myComponents -- npm start
```
{{% /codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,39 @@ When running Dapr, set the YAML component file path to point Dapr to the compone
{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- dotnet run
dapr run --app-id myapp --resources-path ./myComponents -- dotnet run
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run
dapr run --app-id myapp --resources-path ./myComponents -- mvn spring-boot:run
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- python3 app.py
dapr run --app-id myapp --resources-path ./myComponents -- python3 app.py
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- npm start
dapr run --app-id myapp --resources-path ./myComponents -- npm start
```

{{% /codetab %}}

{{% codetab %}}

```bash
dapr run --app-id myapp --components-path ./myComponents -- go run app.go
dapr run --app-id myapp --resources-path ./myComponents -- go run app.go
```

{{% /codetab %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ docker run -d --rm -p 27017:27017 --name mongodb mongo:5
Next, start a Dapr application. Refer to the [component configuration file](../query-api-examples/components/mongodb/mongodb.yml), which instructs Dapr to use MongoDB as its state store.

```bash
dapr run --app-id demo --dapr-http-port 3500 --components-path query-api-examples/components/mongodb
dapr run --app-id demo --dapr-http-port 3500 --resources-path query-api-examples/components/mongodb
```

Populate the state store with the employee dataset, so you can query it later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To create a dedicated components folder with the default `statestore`, `pubsub`,
1. Open your application directory in Visual Studio Code
2. Open the Command Palette with `Ctrl+Shift+P`
3. Select `Dapr: Scaffold Dapr Components`
4. Run your application with `dapr run --components-path ./components -- ...`
4. Run your application with `dapr run --resources-path ./components -- ...`

### View running Dapr applications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pip3 install -r requirements.txt
Run the `batch-sdk` service alongside a Dapr sidecar.

```bash
dapr run --app-id batch-sdk --app-port 50051 --components-path ../../../components -- python3 app.py
dapr run --app-id batch-sdk --app-port 50051 --resources-path ../../../components -- python3 app.py
```

> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
Expand Down Expand Up @@ -292,7 +292,7 @@ npm install
Run the `batch-sdk` service alongside a Dapr sidecar.

```bash
dapr run --app-id batch-sdk --app-port 5002 --dapr-http-port 3500 --components-path ../../../components -- node index.js
dapr run --app-id batch-sdk --app-port 5002 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
```

The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
Expand Down Expand Up @@ -495,7 +495,7 @@ dotnet build batch.csproj
Run the `batch-sdk` service alongside a Dapr sidecar.

```bash
dapr run --app-id batch-sdk --app-port 7002 --components-path ../../../components -- dotnet run
dapr run --app-id batch-sdk --app-port 7002 --resources-path ../../../components -- dotnet run
```

The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
Expand Down Expand Up @@ -701,7 +701,7 @@ mvn clean install
Run the `batch-sdk` service alongside a Dapr sidecar.

```bash
dapr run --app-id batch-sdk --app-port 8080 --components-path ../../../components -- java -jar target/BatchProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id batch-sdk --app-port 8080 --resources-path ../../../components -- java -jar target/BatchProcessingService-0.0.1-SNAPSHOT.jar
```

The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
Expand Down Expand Up @@ -908,7 +908,7 @@ go build .
Run the `batch-sdk` service alongside a Dapr sidecar.

```bash
dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --components-path ../../../components -- go run .
dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
```

The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pip3 install -r requirements.txt
Run the `order-processor` subscriber service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-port 5001 -- python3 app.py
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 5001 -- python3 app.py
```

> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
Expand Down Expand Up @@ -105,7 +105,7 @@ pip3 install -r requirements.txt
Run the `checkout` publisher service alongside a Dapr sidecar.

```bash
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
dapr run --app-id checkout --resources-path ../../../components/ -- python3 app.py
```

> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
Expand Down Expand Up @@ -235,7 +235,7 @@ Verify you have the following files included in the service directory:
Run the `order-processor` subscriber service alongside a Dapr sidecar.

```bash
dapr run --app-port 5001 --app-id order-processing --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- npm run start
dapr run --app-port 5001 --app-id order-processing --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- npm run start
```

In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
Expand Down Expand Up @@ -267,7 +267,7 @@ Verify you have the following files included in the service directory:
Run the `checkout` publisher service alongside a Dapr sidecar.

```bash
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- npm run start
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- npm run start
```

In the `checkout` publisher service, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
Expand Down Expand Up @@ -389,7 +389,7 @@ dotnet build
Run the `order-processor` subscriber service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components --app-port 7002 -- dotnet run
dapr run --app-id order-processor --resources-path ../../../components --app-port 7002 -- dotnet run
```

In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
Expand Down Expand Up @@ -423,7 +423,7 @@ dotnet build
Run the `checkout` publisher service alongside a Dapr sidecar.

```bash
dapr run --app-id checkout --components-path ../../../components -- dotnet run
dapr run --app-id checkout --resources-path ../../../components -- dotnet run
```

In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
Expand Down Expand Up @@ -544,7 +544,7 @@ mvn clean install
Run the `order-processor` subscriber service alongside a Dapr sidecar.

```bash
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-port 8080 --app-id order-processor --resources-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```

In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
Expand Down Expand Up @@ -582,7 +582,7 @@ mvn clean install
Run the `checkout` publisher service alongside a Dapr sidecar.

```bash
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
dapr run --app-id checkout --resources-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
```

In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
Expand Down Expand Up @@ -706,7 +706,7 @@ go build .
Run the `order-processor` subscriber service alongside a Dapr sidecar.

```bash
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run .
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
```

In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
Expand Down Expand Up @@ -736,7 +736,7 @@ go build .
Run the `checkout` publisher service alongside a Dapr sidecar.

```bash
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run .
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- go run .
```

In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pip3 install -r requirements.txt
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- python3 app.py
dapr run --app-id order-processor --resources-path ../../../components/ -- python3 app.py
```

> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
Expand Down Expand Up @@ -164,7 +164,7 @@ npm install
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- npm start
dapr run --app-id order-processor --resources-path ../../../components/ -- npm start
```

#### Behind the scenes
Expand Down Expand Up @@ -278,7 +278,7 @@ dotnet build
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- dotnet run
dapr run --app-id order-processor --resources-path ../../../components/ -- dotnet run
```

#### Behind the scenes
Expand Down Expand Up @@ -389,7 +389,7 @@ mvn clean install
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```

#### Behind the scenes
Expand Down Expand Up @@ -494,7 +494,7 @@ go build .
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- go run .
dapr run --app-id order-processor --resources-path ../../../components/ -- go run .
```

#### Behind the scenes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pip3 install -r requirements.txt
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- python3 app.py
dapr run --app-id order-processor --resources-path ../../../components/ -- python3 app.py
```

> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
Expand Down Expand Up @@ -172,7 +172,7 @@ Verify you have the following files included in the service directory:
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- npm run start
dapr run --app-id order-processor --resources-path ../../../components/ -- npm run start
```
The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.

Expand Down Expand Up @@ -300,7 +300,7 @@ dotnet build
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components/ -- dotnet run
dapr run --app-id order-processor --resources-path ../../../components/ -- dotnet run
```

The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
Expand Down Expand Up @@ -419,7 +419,7 @@ mvn clean install
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```

The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
Expand Down Expand Up @@ -538,7 +538,7 @@ go build .
Run the `order-processor` service alongside a Dapr sidecar.

```bash
dapr run --app-id order-processor --components-path ../../../components -- go run .
dapr run --app-id order-processor --resources-path ../../../components -- go run .
```

The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ When you run `dapr init`, Dapr creates a default redis `pubsub.yaml` on your loc
For new component files:

1. Create a new `components` directory in your app folder containing the YAML files.
1. Provide the path to the `dapr run` command with the flag `--components-path`
1. Provide the path to the `dapr run` command with the flag `--resources-path`

If you initialized Dapr in [slim mode]({{< ref self-hosted-no-docker.md >}}) (without Docker), you need to manually create the default directory, or always specify a components directory using `--components-path`.
If you initialized Dapr in [slim mode]({{< ref self-hosted-no-docker.md >}}) (without Docker), you need to manually create the default directory, or always specify a components directory using `--resources-path`.

{{% /codetab %}}

Expand Down
Loading