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 # Rename to .envrc
export TS_AUTH_KEY="" export TS_AUTHKEY=""
export TS_HOSTNAME="" export TS_HOSTNAME=""
export TS_OPT="" export TS_OPT=""
export TS_SERVE_PORT="" export TS_SERVE_PORT=""

View file

@ -4,9 +4,9 @@ services:
context: ./image/ context: ./image/
container_name: tailscale container_name: tailscale
environment: 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_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') TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80')
volumes: volumes:
- ./ts_data:/var/lib/tailscale/ - ./ts_data:/var/lib/tailscale/

View file

@ -2,9 +2,9 @@
trap 'kill -TERM $PID' TERM INT trap 'kill -TERM $PID' TERM INT
echo "Starting Tailscale daemon" echo "Starting Tailscale daemon"
# -state=mem: will logout and remove ephemeral node from network immediately after ending. # -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=$! 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 sleep 0.1
done done
tailscale status tailscale status

View file

@ -15,11 +15,11 @@ spec:
- name: tailscale - name: tailscale
image: ghcr.io/lpasselin/tailscale-docker:latest image: ghcr.io/lpasselin/tailscale-docker:latest
env: env:
- name: TS_AUTH_KEY - name: TS_AUTHKEY
value: "${TS_AUTH_KEY:-err}" value: "${TS_AUTH_KEY:-err}"
- name: TS_HOSTNAME - name: TS_HOSTNAME
value: "tailscale-docker-k8s-simple" value: "tailscale-docker-k8s-simple"
- name: TS_STATE_ARG - name: TS_STATE
value: "mem:" value: "mem:"
resources: resources:
limits: limits: