mirror of
https://github.com/jbowdre/tailscale-docker.git
synced 2024-11-23 18:32:17 +00:00
update variable names to match official image
This commit is contained in:
parent
a996ea8d28
commit
9e4c2bb4e5
5 changed files with 6 additions and 6 deletions
|
@ -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_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_OPT` | `--verbose=1` | optional additional [flags](https://tailscale.com/kb/1278/tailscaled#flags-to-tailscaled) for `tailscaled` |
|
||||
| `TS_STATE_DIR` | `/var/lib/tailscale/` | required directory for storing Tailscale state, this should be mounted to the container for persistence |
|
||||
| `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_FUNNEL` | `1` | if set (to anything), will proxy `TS_SERVE_PORT` **publicly** with [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) |
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Rename to .env
|
||||
TS_AUTHKEY="" # Required Tailscale auth key
|
||||
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_FUNNEL="" # If set, serve publicly with tailscale funnel
|
|
@ -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_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_FUNNEL: ${TS_FUNNEL:-} # if set, serve publicly with tailscale funnel
|
||||
volumes:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/ash
|
||||
trap 'kill -TERM $PID' TERM INT
|
||||
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=$!
|
||||
until tailscale up --authkey="${TS_AUTHKEY}" --hostname="${TS_HOSTNAME}"; do
|
||||
sleep 0.1
|
||||
|
|
|
@ -19,7 +19,7 @@ spec:
|
|||
value: "${TS_AUTHKEY:-err}"
|
||||
- name: TS_HOSTNAME
|
||||
value: "${TS_HOSTNAME:-ts-docker}"
|
||||
- name: TS_STATEDIR
|
||||
- name: TS_STATE_DIR
|
||||
value: "/var/lib/tailscale"
|
||||
- name: TS_SERVE_PORT
|
||||
value: "${TS_SERVE_PORT:-}"
|
||||
|
|
Loading…
Reference in a new issue