update variable names to match official image

This commit is contained in:
John Bowdre 2023-12-29 21:36:35 -06:00
parent a996ea8d28
commit 9e4c2bb4e5
5 changed files with 6 additions and 6 deletions

View file

@ -19,8 +19,8 @@ Expected environment variables:
| --- | --- | --- | | --- | --- | --- |
| `TS_AUTHKEY` | `tskey-auth-somestring-somelongerstring` | used for unattened auth of the new node, get one [here](https://login.tailscale.com/admin/settings/keys) | | `TS_AUTHKEY` | `tskey-auth-somestring-somelongerstring` | used for unattened auth of the new node, get one [here](https://login.tailscale.com/admin/settings/keys) |
| `TS_HOSTNAME` | `my-app` | optional Tailscale hostname for the new node | | `TS_HOSTNAME` | `my-app` | optional Tailscale hostname for the new node |
| `TS_STATEDIR` | `/var/lib/tailscale/` | required directory for storing Tailscale state, this should be mounted to the container for persistence | | `TS_STATE_DIR` | `/var/lib/tailscale/` | required directory for storing Tailscale state, this should be mounted to the container for persistence |
| `TS_OPT` | `--verbose=1` | optional additional [flags](https://tailscale.com/kb/1278/tailscaled#flags-to-tailscaled) for `tailscaled` | | `TS_TAILSCALED_EXTRA_ARGS` | `--verbose=1` | optional additional [flags](https://tailscale.com/kb/1278/tailscaled#flags-to-tailscaled) for `tailscaled` |
| `TS_SERVE_PORT` | `8080` | optional application port to expose with [Tailscale Serve](https://tailscale.com/kb/1312/serve) | | `TS_SERVE_PORT` | `8080` | optional application port to expose with [Tailscale Serve](https://tailscale.com/kb/1312/serve) |
| `TS_FUNNEL` | `1` | if set (to anything), will proxy `TS_SERVE_PORT` **publicly** with [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) | | `TS_FUNNEL` | `1` | if set (to anything), will proxy `TS_SERVE_PORT` **publicly** with [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) |

View file

@ -1,6 +1,6 @@
# Rename to .env # Rename to .env
TS_AUTHKEY="" # Required Tailscale auth key TS_AUTHKEY="" # Required Tailscale auth key
TS_HOSTNAME="" # Optional hostname for this node TS_HOSTNAME="" # Optional hostname for this node
TS_OPT="" # Optional additional arguments for tailscaled TS_TAILSCALED_EXTRA_ARGS="" # Optional additional arguments for tailscaled
TS_SERVE_PORT="" # Optional backend port to proxy with tailscale serve TS_SERVE_PORT="" # Optional backend port to proxy with tailscale serve
TS_FUNNEL="" # If set, serve publicly with tailscale funnel TS_FUNNEL="" # If set, serve publicly with tailscale funnel

View file

@ -6,7 +6,7 @@ services:
environment: environment:
TS_AUTHKEY: ${TS_AUTHKEY:?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_HOSTNAME: ${TS_HOSTNAME:-ts-docker}
TS_STATEDIR: "/var/lib/tailscale/" # store ts state in a local volume TS_STATE_DIR: "/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_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80')
TS_FUNNEL: ${TS_FUNNEL:-} # if set, serve publicly with tailscale funnel TS_FUNNEL: ${TS_FUNNEL:-} # if set, serve publicly with tailscale funnel
volumes: volumes:

View file

@ -1,7 +1,7 @@
#!/bin/ash #!/bin/ash
trap 'kill -TERM $PID' TERM INT trap 'kill -TERM $PID' TERM INT
echo "Starting Tailscale daemon" echo "Starting Tailscale daemon"
tailscaled --tun=userspace-networking --statedir="${TS_STATEDIR}" ${TS_OPT} & tailscaled --tun=userspace-networking --statedir="${TS_STATE_DIR}" ${TS_TAILSCALED_EXTRA_ARGS} &
PID=$! PID=$!
until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do
sleep 0.1 sleep 0.1

View file

@ -19,7 +19,7 @@ spec:
value: "${TS_AUTHKEY:-err}" value: "${TS_AUTHKEY:-err}"
- name: TS_HOSTNAME - name: TS_HOSTNAME
value: "${TS_HOSTNAME:-ts-docker}" value: "${TS_HOSTNAME:-ts-docker}"
- name: TS_STATEDIR - name: TS_STATE_DIR
value: "/var/lib/tailscale" value: "/var/lib/tailscale"
- name: TS_SERVE_PORT - name: TS_SERVE_PORT
value: "${TS_SERVE_PORT:-}" value: "${TS_SERVE_PORT:-}"