fix(tunnels): connect tool containers to backend network for cloudflared access

This commit is contained in:
Fusion
2026-05-20 17:21:21 +02:00
parent ac6bd3304d
commit 3d64ec9061
2 changed files with 28 additions and 6 deletions
+18
View File
@@ -173,6 +173,24 @@ def get_container_name(instance_name: str) -> str | None:
return None
def connect_container_to_network(container_name: str, network_name: str = "backend") -> bool:
"""Connect a Docker container to an existing network.
Args:
container_name: Name or ID of the container
network_name: Name of the Docker network (default: backend)
Returns:
True if successful, False otherwise
"""
result = subprocess.run(
["docker", "network", "connect", network_name, container_name],
capture_output=True,
text=True,
)
return result.returncode == 0
def get_container_status(container_id: str) -> str:
"""Get the status of a Docker container.