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',