mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-20 21:23:41 +03:00
Co-authored-by: Kai Chappel <kaichappel@users.noreply.github.com>
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
web:
|
|
# Host networking plus kernel TUN mode lets tailscaled create the host
|
|
# tailscale0 interface and routes. umbrelOS host services, such as CIFS
|
|
# mounts used by network backups, need those routes to reach tailnet peers.
|
|
network_mode: "host"
|
|
image: tailscale/tailscale:v1.104.7@sha256:72c1e19e0aedca96b8533bbb0b4368564410ff20b17e53b804eb6c1f04a31be4
|
|
restart: on-failure
|
|
stop_grace_period: 1m
|
|
environment:
|
|
- TS_DEBUG_FIREWALL_MODE=nftables
|
|
# Required for tailscaled to manage the host TUN interface and route table.
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
devices:
|
|
- /dev/net/tun:/dev/net/tun
|
|
# Keep tailscaled in kernel TUN mode so host routes are available.
|
|
#
|
|
# Disable accept-routes on startup to migrate older Tailscale prefs that
|
|
# defaulted to accepting subnet routes. In host networking mode, accepting
|
|
# an overlapping subnet route can route local LAN replies through tailscale0
|
|
# and make the Umbrel unreachable on its LAN IP.
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
tailscale web --listen 0.0.0.0:8240 &
|
|
|
|
(
|
|
for attempt in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30; do
|
|
if tailscale set --accept-routes=false >/dev/null 2>&1; then
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
echo "Warning: failed to disable Tailscale accept-routes; continuing"
|
|
) &
|
|
|
|
exec tailscaled
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data:/var/lib
|