Compare commits

...

2 Commits

Author SHA1 Message Date
alex 27fe8c24ec merge: keep fixed migration with correct compose_path column 2026-05-29 17:18:17 +02:00
alex eef1e4e8c6 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
2026-05-29 17:17:12 +02:00
@@ -20,7 +20,7 @@ depends_on: Sequence[str] | None = None
def upgrade() -> None: def upgrade() -> None:
conn = op.get_bind() conn = op.get_bind()
# Find code-server tool types with broken command overrides # Fix tool_types templates in DB
result = conn.execute( result = conn.execute(
sa.text(""" sa.text("""
SELECT id, compose_template SELECT id, compose_template
@@ -64,12 +64,23 @@ def upgrade() -> None:
) )
print(f"Removed broken command override from LSIO template ({tool_id})") print(f"Removed broken command override from LSIO template ({tool_id})")
# Also clean up existing instance compose files on disk # Fix existing instance compose files on disk
# Use information_schema to check if compose_path column exists
col_result = conn.execute(
sa.text("""
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'tool_instances'
AND column_name = 'compose_path'
""")
).fetchone()
if col_result:
result = conn.execute( result = conn.execute(
sa.text(""" sa.text("""
SELECT id, compose_file_path SELECT id, compose_path
FROM tool_instances FROM tool_instances
WHERE compose_file_path IS NOT NULL WHERE compose_path IS NOT NULL
""") """)
).fetchall() ).fetchall()