From 190e5ffad92b890278fe1fcacd144420857404dc Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 27 Jan 2023 17:07:22 -0600 Subject: [PATCH] notes from mark Signed-off-by: Hannah Hunter --- .../multi-app-dapr-run/multi-app-overview.md | 35 ++++++++++++++++--- .../multi-app-dapr-run/multi-app-template.md | 2 +- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-overview.md b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-overview.md index 8af743ad3..249fa74d3 100644 --- a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-overview.md +++ b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-overview.md @@ -1,7 +1,7 @@ --- type: docs title: Run multiple applications with one command -linkTitle: Multi-app Dapr Run +linkTitle: Multi-app Run weight: 1000 description: Learn the scenarios around running multiple applications with one Dapr command --- @@ -20,7 +20,7 @@ Instead, you simply want to run them as local executables in self-hosted mode. With Multi-app Run, you can easily start multiple applications in self-hosted mode using a single `dapr run -f` command. -## Multi-app template file +## Multi-app Run template file When you execute `dapr run -f`, Dapr parses the multi-app template file initialized with `dapr init`. By default, this template file is called `dapr.yaml`. @@ -44,20 +44,45 @@ apps: ``` -## How does it work? +## Multi-app Run defaults -When running [`dapr init`]({{< ref install-dapr-selfhost.md >}}), this initializes a directory where the default configurations and resources are stored. -For running multiple applications, `dapr init` will initialize the following `~/.dapr/` directory structure: + + +This is the directory structure that you can use, where these are optional When developing multiple applications, each **app directory** can have a `.dapr` folder, which contains a `config.yaml` file and a `resources` directory. If the `.dapr` directory is not present within the app directory, the default `~/.dapr/resources/` and `~/.dapr/config.yaml` locations are used. +1 Go to root .dapr/resources and throw eerything in there and assume all apps will use that directory - all using the same resources path +- point to one place with convention +2 each application can have a different default resources path that you put in application directory +- point to separate places (per app) with convention +3 if you want to call it something other than .dapr, and be explicit about it, you can +- point to different places with whatever names you choose + > This change does not impact the `bin` folder, where the Dapr CLI looks for the `daprd` and `dashboard` binaries. That remains at `~/.dapr/bin/`. +Under .dapr/log folder locally: +app.log - application logs +daprd.log + +Even if you've decided to have a different resources folder, it will still have the logs there ### Precedence rules +## Try it out + + +## Watch the demo + +Watch [this video for an overview on pub/sub multi-tenancy](https://youtu.be/eK463jugo0c?t=1188): + + + + + + ## Next steps \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md index 14a733e7e..864dfb317 100644 --- a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md +++ b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md @@ -33,7 +33,7 @@ common: # optional section for variables shared across apps apps: - appID: webapp # required appDirPath: ./webapp/ # required - resourcesPath: ./webapp/components # (optional) can be default by convention + resourcesPath: ./webapp/resources # (optional) can be default by convention configFilePath: ./webapp/config.yaml # (optional) can be default by convention too, ignore if file is not found. appProtocol: HTTP appPort: 8080