Deploy application to a different organization

Hi there!

Currently, in our project’s repository, we have a single fly.toml config file which we would like to deploy to a new organization. I have seen people suggesting here creating fly.staging.toml, fly.production.toml etc which looks great but it still works within the same org.

This piece of doc is great but doesn’t show how to deploy/list resources in a given organization eg. fly deploy --org xyz-prod.

Do you have any suggestions on how to work with multiple organizations within the same repository?

Best regards :slight_smile:

You shouldn’t need to specify an organization with deploy. App names are globally unique, so once you’ve launched your app in the correct org, you can just fly deploy that fly.toml file and it’ll deploy to that app as long as that deploy can be authorized.

If you had a staging app and a production app, you could have the toml file defined as xyz-staging and then for deploying to production run fly deploy --app xyz-prod. It shouldn’t matter if they’re in different orgs or not.

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