Clarify destination secrets docs#1839
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Kamal’s configuration documentation and templates to accurately describe secrets file lookup order, especially when using destinations, and ensures the docs generator includes all configuration doc sources.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Clarify secrets lookup/override order for both destination and non-destination deploys.
- Add destination-specific note to the init secrets template.
- Include the existing
outputdocs source inbin/docsgeneration map.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/kamal/configuration/docs/env.yml | Updates env/secrets documentation to spell out secrets file precedence and destination behavior. |
| lib/kamal/configuration/docs/configuration.yml | Clarifies how secrets_path maps to -common and destination-specific secrets files. |
| lib/kamal/cli/templates/secrets | Updates the generated secrets template with guidance for destinations and shared secrets. |
| bin/docs | Adds output to the docs generator map so output docs are generated. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # | ||
| # Common secrets across all destinations can be set in `.kamal/secrets-common`. | ||
| # If you are using destinations, Kamal looks for `.kamal/secrets-common` first, then | ||
| # `.kamal/secrets.<DESTINATION>`. The non-destination `.kamal/secrets` file is not read when a |
| @@ -16,10 +16,12 @@ env: | |||
| # | |||
| # Kamal uses dotenv to automatically load environment variables set in the `.kamal/secrets` file. | |||
7a7ca3d to
00501b3
Compare
|
Following up here. The current diff already incorporates the two review notes on |
Summary
.kamal/secretsis not read when a destination is selected.Testing
tmpdir=$(mktemp -d); mkdir -p "$tmpdir/docs/configuration"; ruby bin/docs "$tmpdir"ruby -c bin/docsgit diff --check