From a603a223c4e6628fa4d2fb3b6985e24438a3433d Mon Sep 17 00:00:00 2001 From: Mikei386 <44135113+Mikei386@users.noreply.github.com> Date: Wed, 30 Sep 2026 22:33:36 +0200 Subject: [PATCH] Allow LadyPoly port check after recently closed connections --- deploy/ladypoly/install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/ladypoly/install.py b/deploy/ladypoly/install.py index cb31139..ce6a498 100644 --- a/deploy/ladypoly/install.py +++ b/deploy/ladypoly/install.py @@ -4,7 +4,9 @@ from pathlib import Path base=Path('/opt/athena-ladypoly/data');name='athena-ladypoly';image='athena-ladypoly:3960afc-deck1' if subprocess.run(['docker','inspect',name],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL).returncode==0: raise SystemExit('LadyPoly container already exists; no automatic replacement.') -with socket.socket() as s:s.bind(('127.0.0.1',8127)) +with socket.socket() as s: + s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) + s.bind(('127.0.0.1',8127)) base.mkdir(parents=True,exist_ok=True);os.chown(base,65534,65534);base.chmod(0o700) subprocess.check_call(['docker','run','-d','--name',name,'--network','host','--restart','unless-stopped','--read-only', '--cap-drop','ALL','--security-opt','no-new-privileges:true','--memory','1g','--cpus','2',