mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-07 05:24:40 +08:00
Break Fly steps in two
This commit is contained in:
parent
4866694cb9
commit
17bd9ebdde
1 changed files with 26 additions and 14 deletions
|
@ -107,13 +107,24 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do
|
||||||
<:tab id="fly_io" label="Fly.io">
|
<:tab id="fly_io" label="Fly.io">
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<p class="text-gray-700">
|
<p class="text-gray-700">
|
||||||
Deploy an app server to Fly.io with a few commands.
|
Deploy an app server to Fly.io with a few commands. Let's first configure the application resources:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<.code_preview_with_title_and_copy
|
<.code_preview_with_title_and_copy
|
||||||
title="CLI"
|
title="CLI"
|
||||||
source_id="agent-fly-source"
|
source_id="agent-fly-source-1"
|
||||||
source={@instructions.fly_instructions}
|
source={@instructions.fly_instructions.step_one}
|
||||||
|
language="shell"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<p class="text-gray-700">
|
||||||
|
Now let's set secrets and deploy it:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<.code_preview_with_title_and_copy
|
||||||
|
title="CLI"
|
||||||
|
source_id="agent-fly-source-2"
|
||||||
|
source={@instructions.fly_instructions.step_two}
|
||||||
language="shell"
|
language="shell"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -218,18 +229,19 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do
|
||||||
|> String.replace(~r/[^\w-]/, "")
|
|> String.replace(~r/[^\w-]/, "")
|
||||||
|> String.downcase()
|
|> String.downcase()
|
||||||
|
|
||||||
"""
|
%{
|
||||||
# Create a directory for your Fly app config
|
step_one: """
|
||||||
mkdir #{example_dir}
|
mkdir #{example_dir}
|
||||||
cd #{example_dir}
|
cd #{example_dir}
|
||||||
|
fly launch --image #{image} --vm-memory 2048 --no-deploy
|
||||||
|
""",
|
||||||
|
step_two: """
|
||||||
|
fly secrets set \\
|
||||||
|
#{envs}
|
||||||
|
|
||||||
fly launch --image #{image} --vm-memory 2048 --no-deploy
|
fly deploy --ha=false
|
||||||
|
"""
|
||||||
fly secrets set \\
|
}
|
||||||
#{envs}
|
|
||||||
|
|
||||||
fly deploy --ha=false
|
|
||||||
"""
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp k8s_instructions(image, env) do
|
defp k8s_instructions(image, env) do
|
||||||
|
|
Loading…
Add table
Reference in a new issue