Open lwbt opened 5 days ago
I just found the easier solution after looking at the Jellyfin example.
--- https://github.com/2Tiny2Scale/tailscale-docker-sidecar-configs/blob/14eac89007ae0e65e6662f77fd701c665465bc00/services/uptime-kuma/docker-compose.yml
+++ Expose local port
@@ -26,6 +26,8 @@
timeout: 10s # Time to wait for the check to succeed
retries: 3 # Number of retries before marking as unhealthy
start_period: 10s # Time to wait before starting health checks
+ ports:
+ - 0.0.0.0:3001:3001 # <Host Port>:<Container Port>
restart: always
# uptime-kuma
You can expose the ports to your local network by adding the ports:
to the Tailscale sidecar configuration. For example, as in the above code.
ports:
- "0.0.0.0:53:53/udp"
- "0.0.0.0:53:53/tcp"
Where you can do this multiple ways, up to you to determine the required configuration.
"0.0.0.0:53:53/**udp**"
- listening on all the host machine's network adapters on port 53/udp
"10.10.10.1:53:53/udp"
- listening on the specific IP-adres of the host machine 10.10.10.1
on port 53/udp
After 2 hours of refactoring and looking around for solutions I asked Claude and came up with this:
It basically moves
network_mode
anddepends_on
to the Tailscale container and then adds a bridge network and exposes the port locally. This is not ideal as it also exposes the port on${TS_CERT_DOMAIN}
¹, but it accomplishes what I had in mind.I thought I put it up here for discussion, eventually someone finds a better solution.
1: I tried to configure
serve.json
either to also serve HTTPS on this port or disable this port or redirect to port 443, but I my attempts always resulted in a non-functional configuration/