j
File size: 559 Bytes
5a57abb
 
050210c
 
1d07a81
050210c
5a57abb
a93dbb6
 
 
 
 
 
5a57abb
050210c
5a57abb
 
050210c
 
5a57abb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# 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