Openyx commited on
Commit
4882aa6
·
verified ·
1 Parent(s): eabf904

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +6 -8
entrypoint.sh CHANGED
@@ -1,19 +1,17 @@
1
  #!/bin/bash
2
  set -e
3
 
4
- # Start g4f API server in the background
 
 
 
5
  python -m g4f --port 7860 &
6
  G4F_PID=$!
7
 
8
- # Wait a bit for the server to be ready
9
  sleep 2
10
 
11
- # Create public HTTPS tunnel with serveo.net
12
- ssh -o StrictHostKeyChecking=no \
13
- -o UserKnownHostsFile=/dev/null \
14
- -R 80:localhost:7860 \
15
- serveo.net
16
 
17
- # Cleanup when the tunnel exits
18
  kill $G4F_PID 2>/dev/null
19
  wait $G4F_PID 2>/dev/null
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ # Optional: allow overriding the subdomain via environment variable
5
+ SUBDOMAIN=${LT_SUBDOMAIN:-g4f}
6
+
7
+ # Start g4f API server in background
8
  python -m g4f --port 7860 &
9
  G4F_PID=$!
10
 
 
11
  sleep 2
12
 
13
+ # Create localtunnel with your custom subdomain
14
+ lt --port 7860 --subdomain "$SUBDOMAIN"
 
 
 
15
 
 
16
  kill $G4F_PID 2>/dev/null
17
  wait $G4F_PID 2>/dev/null