Repository navigation
feat: background mode for ollama_tailnet - #46
Merged
Merged
Conversation
`ollama_tailnet up -d` (or `ollama_tailnet -d`) runs the proxy in the background with --restart unless-stopped, so it keeps serving after the terminal closes and comes back when Docker restarts. `down` stops it. Caddy and Tailscale now share a Docker network instead of Caddy joining the Tailscale container's network namespace, so each container can restart on its own. Warns when OrbStack isn't set to start at login, since the containers can't come back after a reboot without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The containers restart with Docker, but an `ollama serve` started by the function doesn't survive a reboot. Warn about that in background mode, alongside the OrbStack start-at-login warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a background mode to
ollama_tailnet:Changes
-d/--detachruns both containers with--restart unless-stoppedinstead of--rm, runs the startup checks in the foreground, then returns.ts-ollama) instead of Caddy joining the Tailscale container's network namespace. With a shared namespace, restarting the Tailscale container would leave Caddy without a network; now each restarts independently. Serve proxies tohttp://ts-ollama-proxy:8080.ollama servethe function started itself (rather than the Ollama app).downalso removes the network;statussays "not running" instead of a Docker error.Testing
All against a loopback-only Ollama, with HTTPS requests over the tailnet:
up -d: returns, keeps serving; still serves after restarting Caddy alone, Tailscale alone, and a full OrbStack stop/start.upwhile-dis running replaces it; ctrl-c leaves nothing behind.downremoves both containers and the network.Reviewed with Codex over 2 rounds; the last round had no findings.
🤖 Generated with Claude Code