diff --git a/docker-compose/simple-example/docker-compose.yml b/docker-compose/simple-example/docker-compose.yml index 8693cae..333299c 100644 --- a/docker-compose/simple-example/docker-compose.yml +++ b/docker-compose/simple-example/docker-compose.yml @@ -7,6 +7,8 @@ services: TAILSCALE_AUTH_KEY: ${TAILSCALE_AUTH_KEY:?err} TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-tailscale-docker-simple-example} TAILSCALE_STATE_ARG: "mem:" + # (optional) set additional flags on tailscaled + # TAILSCALE_OPT: --outbound-http-proxy-listen=localhost:1055 some-service-1: image: nginxdemos/hello network_mode: "service:tailscale" diff --git a/images/tailscale/start.sh b/images/tailscale/start.sh index 73aaaed..92e4e06 100644 --- a/images/tailscale/start.sh +++ b/images/tailscale/start.sh @@ -2,11 +2,11 @@ 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=${TAILSCALE_STATE_ARG} & +tailscaled --tun=userspace-networking --state=${TAILSCALE_STATE_ARG} ${TAILSCALE_OPT} & PID=$! until tailscale up --authkey="${TAILSCALE_AUTH_KEY}" --hostname="${TAILSCALE_HOSTNAME}"; do sleep 0.1 done tailscale status wait ${PID} -wait ${PID} \ No newline at end of file +wait ${PID}