Hacker News new | ask | show | jobs
by robgough 29 days ago
I do all my dev inside docker/orbstack environments. I've been using a Tailscale sidecar for each, which has let me easily spin up second (and third!) copy of each repo without having to worry about them interfering with each other (the same open ports etc.). I've not extended to using worktrees, as right now I prefer entirely separate clone's of a repo, but that may well change and I suspect this would work well for that too.

https://robgough.net/multiple-app-instances-with-tailscale

Also has the handy effect of making it super easy to share my dev environment with anyone else on my tailnet, though this could be locked down if needed.

1 comments

Looks like you provision a fresh tailnet host for each clone? You mention multi-tenancy via subdomain routing and I wonder if this is unrelated.
I do yeah, Tailscale is generous with the "device" counts so I'm not worried about using them up -- especially as I spin them up as ephemeral, so as soon as I shutdown the stack they're gone, but the "random" name persists across shutdowns as I store it in a file that stays out of git.

The subdomain routing then works by pointing to that ephemeral machines ip, and my site in dev mode populates the sidebar with active links for this so it's not like I have to keep updating bookmarks etc. Super convenient. It's probably the weakest part of the setup (no https) but works fine for my needs.