fix(cloudflared): remove command override for LSIO images
Problem: linuxserver/code-server already binds to 0.0.0.0 by default. Adding any command: override (--bind-addr or --host) breaks the LSIO s6 init system with 'not found' errors. Changes: - _ensure_web_bind_address(): Skip LSIO images entirely (no command override needed). If an existing override is found, remove it. - New migration 2026_05_29_remove_lsio_command_override: Removes --bind-addr and --host command overrides from both DB templates and existing instance compose files on disk for LSIO images. - Fixed migration to use correct column name (compose_path) and check information_schema for column existence defensively. Quality gates: ruff clean
This commit is contained in:
@@ -652,6 +652,21 @@ def _ensure_web_bind_address(compose_path: str, tool_type_name: str) -> None:
|
||||
if not image:
|
||||
continue
|
||||
|
||||
# LSIO images already bind to 0.0.0.0 — command override breaks s6 init
|
||||
if "linuxserver" in image:
|
||||
existing_command = service_config.get("command", "")
|
||||
if "--bind-addr" in existing_command or "--host" in existing_command:
|
||||
del service_config["command"]
|
||||
compose_file.write_text(
|
||||
yaml.dump(compose_data, default_flow_style=False)
|
||||
)
|
||||
logger.warning(
|
||||
"Removed broken command override from LSIO image: %s",
|
||||
existing_command,
|
||||
)
|
||||
return
|
||||
return
|
||||
|
||||
# Check if the image matches a known tool
|
||||
is_code_server = tool_type_name == "code-server" and (
|
||||
"code-server" in image or "coder" in image
|
||||
|
||||
Reference in New Issue
Block a user