Repository navigation
Conversation
Signed-off-by: GitHub <noreply@github.com>
CasperGN
left a comment
There was a problem hiding this comment.
Thanks @ep0ll for your interest in Dapr and for adding envFile to the Multi-App Run template docs 🙌 I like that both the example and the property tables spell out that env and envFile can't be used together, and the precedence note is a nice touch. The PR description is empty, so could you link the dapr/cli change or issue that adds envFile and say which CLI release ships it? That makes it easy to confirm it belongs on the v1.19 branch. I left a few comments inline, please take a look 👀
Drafted with AI assistance and reviewed by me.
| | `appHealthThreshold` | N | Number of consecutive failures for the app to be considered unhealthy | | | ||
| | `enableApiLogging` | N | Enable the logging of all API calls from application to Dapr | | | ||
| | `env` | N | Map to environment variable; environment variables applied per application will overwrite environment variables shared across applications | `DEBUG`, `DAPR_HOST_ADD` | | ||
| | `envFile` | N | Path to a `.env` file containing environment variables. Cannot be used together with `env` in the same section. Environment variables applied per application will overwrite those shared across applications | `./app.env` | |
There was a problem hiding this comment.
Does dapr run -k actually read envFile when it deploys to Kubernetes? The .env file is local, so I'd like to be sure the CLI puts those variables into the generated deployment. If it does, I think the Kubernetes tab should also get the commented envFile lines in its example and the note that env and envFile can't be used together, so the two tabs match. If it doesn't, could we drop this row?
| - `appDirPath` under apps section should be provided relative to the template file path. | ||
| - All other relative paths under apps section should be provided relative to the `appDirPath`. | ||
|
|
||
| For environment variables, `env` and `envFile` are mutually exclusive within the same section (`common` or an app). Precedence, highest first: app `envFile` or `env`, then `common` `env` or `envFile`. |
There was a problem hiding this comment.
What do you think about also saying where a relative envFile path resolves from? Going by the path rules just above, I'd expect an app's envFile to resolve from its appDirPath and the common one from the template file. Saying so here would save readers a guess, since ./backend.env in the example only works if that's true.
There was a problem hiding this comment.
ATM, they resolve from the current working dir from where the cmd ran, should i update the code insteadin PR: dapr/cli#1740
| | `enableApiLogging` | N | Enable the logging of all API calls from application to Dapr | | | ||
| | `runtimePath` | N | Dapr runtime install path | | | ||
| | `env` | N | Map to environment variable; environment variables applied per application will overwrite environment variables shared across applications | `DEBUG`, `DAPR_HOST_ADD` | | ||
| | `envFile` | N | Path to a `.env` file containing environment variables. Cannot be used together with `env` in the same section. Environment variables applied per application will overwrite those shared across applications | `./app.env` | |
There was a problem hiding this comment.
Could you add a link to the dapr/cli PR or release that adds envFile, either in the PR description or as a version note here (for example "Available from Dapr CLI v1.x")? Nothing else in the docs mentions envFile or a matching --env-file flag yet, so readers on an older CLI would hit an unknown field.
Document Kubernetes envFile support and path resolution, align examples, and link the CLI implementation and issue. Signed-off-by: Sai Kiran Maggidi <107541780+ep0ll@users.noreply.github.com>
Document envFile in the Kubernetes tab, state that relative envFile paths resolve from the working directory, and replace the CLI PR and issue links with a version note. Signed-off-by: GitHub <noreply@github.com>
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Documents the new
envFileproperty in the Multi-App Run template (multi-app-template.md), added to the Dapr CLI in dapr/cli#1740.Documents the new
envFileoption for the Multi-App Run template, which lets you load environment variables from a.envfile instead of listing them inline. It covers both self-hosted and Kubernetes runs, explains howenvFilerelates toenv, and notes where relative paths are resolved from and which Dapr CLI version introduces it.Issue reference
Related to dapr/cli#1369 (the CLI feature request for
envFilesupport). There is no docs issue to close.