Skip to content

feat: support envFile in multi-app run template - #1695

Open
magic-peach wants to merge 1 commit into
dapr:masterfrom
magic-peach:feat/multi-app-run-env-file
Open

magic-peach wants to merge 1 commit into
dapr:masterfrom
magic-peach:feat/multi-app-run-env-file

Conversation

@magic-peach

Copy link
Copy Markdown

Description

The multi app run template file only supports environment variables listed inline under an env map for each app. This PR adds an envFile field so an app can instead point at a file of KEY=VALUE lines (blank lines and lines starting with # are ignored). Values are merged into the app's environment during config validation; if a key exists in both env and envFile, the inline env value wins.

Issue reference

Please reference the issue this PR will close: #1369

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Notes:

  • Compiles: verified with go build ./pkg/standalone/... and go vet ./pkg/standalone/....
  • Tests: added TestParseEnvFile and TestValidateEnvFile in pkg/standalone/run_test.go, covering parsing, missing file errors, and the merge/precedence behavior with an existing env map. Full package test suite passes.
  • Documentation: the multi app run template fields are documented on docs.dapr.io (linked from the issue). This PR does not include a docs.dapr.io update; one would be a genuine follow-up need before this reaches users through the docs site.

Add an envFile field to the run config so apps can load environment
variables from a file instead of listing them all inline under env.
Values from env still win on key conflicts.

Closes dapr#1369

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@magic-peach
magic-peach requested review from a team as code owners September 5, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add support for envfile in the dapr multiapp run

1 participant