# Start tailscaled in background and show logs | |
echo "Starting tailscaled..." | |
mkdir -p /var/run/tailscale | |
tailscaled --tun=userspace-networking --socks5-server=localhost:1055 & | |
# Wait for tailscaled to be ready | |
echo "Waiting for tailscaled to be ready..." | |
until tailscale status &> /dev/null; do | |
sleep 1 | |
done | |
echo "tailscaled is ready." | |
# Bring up Tailscale interface (interactive or with auth key) | |
tailscale up --netfilter-mode=off | |
# Start the Flask app using gunicorn | |
echo "Starting Flask app..." | |
exec gunicorn --bind 0.0.0.0:7860 app:app |