-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.sh
49 lines (43 loc) · 1.49 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Function to display network information
show_network_info() {
echo "=== Exploit Seek v1.2 ==="
echo "=== Starting services... ==="
date "+%Y-%m-%d %H:%M:%S"
echo "=== Available addresses ==="
echo "Container IP addresses:"
hostname -I | tr ' ' '\n' | while read ip; do
if [ ! -z "$ip" ]; then
echo " http://$ip:5000 - Server API"
echo " http://$ip:8080 - Client Interface"
fi
done
echo "Host addresses:"
# Try different methods to get host IP
HOST_IP=$(ip route get 1.1.1.1 2>/dev/null | grep -oP 'src \K\S+' || hostname -I | awk '{print $1}')
if [ ! -z "$HOST_IP" ]; then
echo " http://$HOST_IP:5000 - Server API (Host)"
echo " http://$HOST_IP:8080 - Client Interface (Host)"
fi
echo "Local addresses:"
echo " http://localhost:5000 - Server API"
echo " http://localhost:8080 - Client Interface"
echo " http://127.0.0.1:5000 - Server API"
echo " http://127.0.0.1:8080 - Client Interface"
echo "=========================="
}
# Show network information
show_network_info
# Start the Python server in the background
cd /app
gunicorn --worker-class gevent \
--workers 2 \
--timeout 300 \
--max-requests 1000 \
--max-requests-jitter 50 \
--keep-alive 5 \
--log-level info \
--bind 0.0.0.0:5000 server:app &
# Start the client server with all interfaces
cd /app/client
serve -s dist -l tcp://0.0.0.0:8080