--ha=false command still starts two machines

I’m working on minor project and don’t need two machines as they interfer each others logic. I’m trying to run flyctl deploy --ha=false but it still shows [2/2] Machine. How do I fix it?

my fly.toml is

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = false
min_machines_running = 1
processes = [“app”]

If the machines are already created, I think you need to scale down or destroy a machine.

After deploying all machines will restart and be alive, then scale back down to the minimum. Assuming the app lets it.

If your issue is that you have two instances, and only want one, then you can destroy one.

3 Likes

Scaling down with flyctl scale count 1 -y and redeploying fixed my issue.

I left it in my deploy script just to be sure.

flyctl deploy --ha=false && flyctl scale count 1 -y
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.