fix: postCreate failures (absolute paths, sudo HOME, socket-wait bug)

This commit is contained in:
Jonas Miederer 2026-09-11 19:21:13 +02:00
parent d4aeab8dbf
commit 80d81b8022
2 changed files with 10 additions and 5 deletions

View file

@ -11,8 +11,10 @@ REPO=/srv/kirche-einfach
# UV_PROJECT_ENVIRONMENT/UV_PYTHON_INSTALL_DIR plus every compose-provided
# variable — uv then created a project-local backend/.venv in the bind-mount
# instead of using /opt/venv, and sync_flows.py ran without its settings.)
# -H repoints HOME to /home/vscode: without it HOME stays /root (from the
# outer sudo) and uv/pip caches fail with Permission denied.
as_vscode() {
sudo -u vscode -E bash -c "$*"
sudo -H -u vscode -E bash -c "$*"
}
# Venv lives outside the bind-mount (see backend/Dockerfile).
@ -71,13 +73,13 @@ targets = [("langflow", 7860), ("lfx", 6004)]
deadline = time.time() + 180
pending = dict(targets)
while pending and time.time() < deadline:
for host, port in list(pending):
for host, port in list(pending.items()):
s = socket.socket()
s.settimeout(2)
try:
s.connect((host, port))
print(f"OK {host}:{port}", flush=True)
del pending[(host, port)]
del pending[host]
except OSError:
pass
finally: