From a587128a60fab3b9185b7f42b4844846387ee1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 25 Jun 2024 11:30:22 +0200 Subject: [PATCH] Normalize example dir in app server fly instructions (#2676) --- .../live/hub/teams/deployment_group_agent_component.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex index fce1a66df..dcbeec01b 100644 --- a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex +++ b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex @@ -195,7 +195,10 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do defp fly_instructions(image, env, hub_name, deployment_group_name) do envs = Enum.map_join(env, " \\\n", fn {key, value} -> ~s/ #{key}="#{value}"/ end) - example_dir = "#{hub_name}-#{deployment_group_name}-lb-server" + example_dir = + "lb-server-#{hub_name}-#{deployment_group_name}" + |> String.replace(~r/[^\w-]/, "") + |> String.downcase() """ # Create a directory for your Fly app config