Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the ha flag usage to get only one Machine #1053

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion reference/app-availability.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down