adjust variable names

This commit is contained in:
John Bowdre 2023-12-28 22:20:00 -06:00
parent 7badd5ea71
commit 0607edef46
4 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
# Rename to .envrc
export TS_AUTH_KEY=""
export TS_AUTHKEY=""
export TS_HOSTNAME=""
export TS_OPT=""
export TS_SERVE_PORT=""

View file

@ -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/

View file

@ -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

View file

@ -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: