[go: up one dir, main page]

Menu

[bbac43]: / docker / tunnel.sh  Maximize  Restore  History

Download this file

17 lines (13 with data), 416 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/bash
export TUNNEL_LOGFILE=/root/cloudflared.log
export TUNNEL_LOGLEVEL=info
# load env file
ENV_FILE=.env
if [[ -f "$ENV_FILE" ]]; then
source $ENV_FILE
fi
# start cloudflared if token is provided
# https://developers.cloudflare.com/cloudflare-one/tutorials/cli/
if [[ -n "$CLOUDFLARE_TOKEN" ]]; then
cloudflared tunnel --url http://localhost:5001 --no-autoupdate run --token $CLOUDFLARE_TOKEN &
fi