exec @docker
This commit is contained in:
parent
e8f98d19ad
commit
fe70ae0c21
@ -14,7 +14,7 @@ def find_available_port(start_port=80):
|
|||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
sock.bind(('localhost', start_port))
|
sock.bind((os.getenv('DB_SERVER','localhost'), start_port))
|
||||||
color_log.Show(3,f" {start_port} is Open")
|
color_log.Show(3,f" {start_port} is Open")
|
||||||
return start_port
|
return start_port
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user