fix: allow proxy image startup time

This commit is contained in:
2026-09-23 00:52:49 +08:00
parent 2b93545507
commit 1a534c7976

View File

@@ -236,7 +236,7 @@ def main() -> None:
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
text=True, text=True,
) )
deadline = time.monotonic() + 30 deadline = time.monotonic() + 120
while time.monotonic() < deadline: while time.monotonic() < deadline:
if nginx.poll() is not None: if nginx.poll() is not None:
raise RuntimeError(f"Nginx exited with code {nginx.returncode}") raise RuntimeError(f"Nginx exited with code {nginx.returncode}")
@@ -246,7 +246,13 @@ def main() -> None:
except OSError: except OSError:
time.sleep(0.2) time.sleep(0.2)
else: else:
raise RuntimeError("Nginx did not start listening") nginx_logs = subprocess.run(
["docker", "logs", nginx_name], capture_output=True, text=True, check=False
)
raise RuntimeError(
f"Nginx did not start listening; logs="
f"{(nginx_logs.stdout + nginx_logs.stderr)[-4000:]!r}"
)
try: try:
wait_for_proxy(edge_port, 30) wait_for_proxy(edge_port, 30)