From 09c7611632b316c2cc94c6607dc9d0f1fbd69da7 Mon Sep 17 00:00:00 2001 From: andie787 <4andie@gmail.com> Date: Wed, 20 Sep 2023 10:27:56 -0400 Subject: [PATCH] clarify the ha flag usage --- reference/app-availability.html.markerb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/reference/app-availability.html.markerb b/reference/app-availability.html.markerb index 0d47613e64..6946a28dfd 100644 --- a/reference/app-availability.html.markerb +++ b/reference/app-availability.html.markerb @@ -93,12 +93,28 @@ At a lower level, you can also use the `fly machines update` command with the `- What if you don't want to keep Machines running all the time for an app with a small or variable workload? The [automatic start and stop feature](#automatically-start-and-stop-machines) is enabled by default for Machines and makes it possible to run at least two Machines without wasting resources. -If you still don't want `fly deploy` to create two Machines, then you can use the `--ha` option to turn off this feature: +If you still don't want `fly launch` or `fly deploy` to create two Machines, then you can use the `--ha` option to turn off this feature. + +Create one Machine for a new app: + +```cmd +fly launch --ha=false +``` + +Create one Machine on first deploy or when your app is scaled down to zero Machines: ```cmd fly deploy --ha=false ``` +Scale down an app to one Machine: + +```cmd +fly scale count 1 +``` + +For apps with more than one process, refer to [Scale a process group horizontally](/docs/apps/processes/#scale-a-process-group-horizontally). + ## Automatically start and stop Machines Automatic start and stop works for process groups with services defined. This feature enables you to have multiple Machines that only run when needed.