worktrunk
worktrunk copied to clipboard
add example of salting to docs
add a small example of this to the appropriate place in the docs
https://x.com/tomnagengast/status/2025278356896580057?s=46&t=gE4ZC1TLTv8A9JulnUJwQg!
Thanks for the suggestion! This is a feature request for documentation, so I'll leave it for a maintainer to evaluate and prioritize.
For context, the "salting" pattern (prefixing the input to hash_port to get different ports per service) is partially documented today:
docs/content/hook.md— documentshash_portand shows the concatenation example{{ ('db-' ~ branch) | hash_port }}docs/content/tips-patterns.md— "Database per worktree" section uses the pattern in a full Docker example
A dedicated "salting" example could make the pattern more discoverable — e.g., showing how branch | hash_port and ('db-' ~ branch) | hash_port produce different ports so a dev server and database can each get their own.