worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

add example of salting to docs

Open max-sixty opened this issue 9 months ago • 1 comments

add a small example of this to the appropriate place in the docs

https://x.com/tomnagengast/status/2025278356896580057?s=46&t=gE4ZC1TLTv8A9JulnUJwQg!

image

max-sixty avatar Feb 22 '26 13:02 max-sixty

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 — documents hash_port and 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.

worktrunk-bot avatar Feb 22 '26 13:02 worktrunk-bot