diff --git a/docker-compose-example/docker-compose.yml b/docker-compose-example/docker-compose.yml index 1524fa7..c765915 100644 --- a/docker-compose-example/docker-compose.yml +++ b/docker-compose-example/docker-compose.yml @@ -6,7 +6,7 @@ services: environment: TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker} - TS_STATE: "/var/lib/tailscale/tailscale.state" # store ts state in a local volume + TS_STATEDIR: "/var/lib/tailscale/" # store ts state in a local volume TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80') TS_FUNNEL_PORT: ${TS_FUNNEL_PORT:-} # optional port to publish publicly with tailscale funnel (ex: '80') volumes: diff --git a/image/start.sh b/image/start.sh index e2642ca..ae11593 100644 --- a/image/start.sh +++ b/image/start.sh @@ -1,7 +1,7 @@ #!/bin/ash trap 'kill -TERM $PID' TERM INT echo "Starting Tailscale daemon" -tailscaled --tun=userspace-networking --state=${TS_STATE} ${TS_OPT} & +tailscaled --tun=userspace-networking --statedir="${TS_STATEDIR}" ${TS_OPT} & PID=$! until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do sleep 0.1