Skip to content

Clarify destination secrets docs#1839

Open
cookesan wants to merge 1 commit intobasecamp:mainfrom
cookesan:docs/destination-secrets
Open

Clarify destination secrets docs#1839
cookesan wants to merge 1 commit intobasecamp:mainfrom
cookesan:docs/destination-secrets

Conversation

@cookesan
Copy link
Copy Markdown

@cookesan cookesan commented Apr 24, 2026

Summary

  • Document the exact secrets file lookup order with and without destinations.
  • Clarify that .kamal/secrets is not read when a destination is selected.
  • Add the destination note to the generated docs source and the init secrets template.
  • Include the existing output docs page in the docs generator map so all configuration docs sources can be generated.

Testing

  • tmpdir=$(mktemp -d); mkdir -p "$tmpdir/docs/configuration"; ruby bin/docs "$tmpdir"
  • ruby -c bin/docs
  • git diff --check
  • Not run: Ruby unit tests; the local Ruby toolchain does not match the lockfile.

@cookesan cookesan marked this pull request as ready for review April 24, 2026 23:19
Copilot AI review requested due to automatic review settings April 24, 2026 23:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 output docs source in bin/docs generation 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.

Comment thread lib/kamal/configuration/docs/env.yml Outdated
#
# 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
Comment thread lib/kamal/configuration/docs/env.yml Outdated
@@ -16,10 +16,12 @@ env:
#
# Kamal uses dotenv to automatically load environment variables set in the `.kamal/secrets` file.
@cookesan cookesan force-pushed the docs/destination-secrets branch from 7a7ca3d to 00501b3 Compare April 24, 2026 23:39
Copy link
Copy Markdown
Author

Following up here. The current diff already incorporates the two review notes on env.yml: it now refers to the configured secrets files instead of a single .kamal/secrets file, and it uses <destination> consistently in the destination-specific path examples. If there's anything else you'd like tightened before review, I'm happy to update it.

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.

2 participants