How to deploy after stopping the previous one version?

How to deploy a new version/release before full stopping the previous one?

My service can only make one connection, so I need to stop the previous one before deploying the new release. Otherwise, more than one instance will not make it work.

This can be done by setting the deployment strategy to rolling.

e.g in fly.toml:

  strategy = "rolling"