diff --git a/.envrc_template b/.envrc_template index 5b700a8..1c318ad 100644 --- a/.envrc_template +++ b/.envrc_template @@ -1,5 +1,5 @@ # Rename to .envrc -export TS_AUTH_KEY="" +export TS_AUTHKEY="" export TS_HOSTNAME="" export TS_OPT="" export TS_SERVE_PORT="" \ No newline at end of file diff --git a/docker-compose-example/docker-compose.yml b/docker-compose-example/docker-compose.yml index 8b29986..d2933c1 100644 --- a/docker-compose-example/docker-compose.yml +++ b/docker-compose-example/docker-compose.yml @@ -4,9 +4,9 @@ services: context: ./image/ container_name: tailscale environment: - TS_AUTH_KEY: ${TS_AUTH_KEY:?err} # from https://login.tailscale.com/admin/settings/authkeys + TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker} - TS_STATE_ARG: "/var/lib/tailscale/tailscale.state" # store ts state in a local volume + TS_STATE: "/var/lib/tailscale/tailscale.state" # store ts state in a local volume TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80') volumes: - ./ts_data:/var/lib/tailscale/ diff --git a/image/start.sh b/image/start.sh index 9103a65..82e762a 100644 --- a/image/start.sh +++ b/image/start.sh @@ -2,9 +2,9 @@ trap 'kill -TERM $PID' TERM INT echo "Starting Tailscale daemon" # -state=mem: will logout and remove ephemeral node from network immediately after ending. -tailscaled --tun=userspace-networking --state=${TS_STATE_ARG} ${TS_OPT} & +tailscaled --tun=userspace-networking --state=${TS_STATE} ${TS_OPT} & PID=$! -until tailscale up --authkey="${TS_AUTH_KEY}" --hostname="${TS_HOSTNAME}"; do +until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do sleep 0.1 done tailscale status diff --git a/k8s-example/deployment.yaml b/k8s-example/deployment.yaml index 9087d8d..b545da4 100644 --- a/k8s-example/deployment.yaml +++ b/k8s-example/deployment.yaml @@ -15,11 +15,11 @@ spec: - name: tailscale image: ghcr.io/lpasselin/tailscale-docker:latest env: - - name: TS_AUTH_KEY + - name: TS_AUTHKEY value: "${TS_AUTH_KEY:-err}" - name: TS_HOSTNAME value: "tailscale-docker-k8s-simple" - - name: TS_STATE_ARG + - name: TS_STATE value: "mem:" resources: limits: