16 lines
418 B
Bash
16 lines
418 B
Bash
|
|
#!/bin/sh
|
||
|
|
set -e
|
||
|
|
|
||
|
|
# Start tailscale in userspace networking mode (no TUN device needed)
|
||
|
|
tailscaled --tun=userspace-networking --statedir=/var/lib/tailscale &
|
||
|
|
sleep 2
|
||
|
|
|
||
|
|
# Authenticate and join tailnet
|
||
|
|
tailscale up --authkey="${TS_AUTHKEY}" --hostname=flyio-proxy
|
||
|
|
|
||
|
|
# Wait for tailscale to be ready
|
||
|
|
until tailscale status > /dev/null 2>&1; do sleep 1; done
|
||
|
|
echo "Tailscale connected"
|
||
|
|
|
||
|
|
# Start nginx
|
||
|
|
nginx -g "daemon off;"
|