Steps for recreating and redeploying app you've accidentally removed, but still have config for?

I had an old app that I wasn’t using that I removed so I could clean up my dashboard and wouldn’t need to pay for the instances. However, I forgot that I had a use case for it, which came up today. I am trying to recreate and redeploy the app, however I am running into some issues.

I run flyctl apps create <my-app> which works, but once I try to run
flyctl deploy --config <path_to_toml> --dockerfile <path_to_dockefile> --remote-only -a <my-app>, it says
“Error: failed to grab app config from existing machines, error: could not create a fly.toml from any machines :frowning:
No machines configured for this app”

When I try to run the flyctl machine create (which I am not sure is right), I am not sure how to use my local image. And when I try to use flyctl launch, it doesn’t let me specify a path to my old toml file (“unknown flag: --config”). I just want to recreate the app the way it was before, how do I do this?

hi @judson

You could try putting a copy of your fly.toml into the project source directory of the new app and then running fly launch. It will ask if you want to use the existing config file.

One thing I noticed is that fly launch will append a random name to the end of the app name from the fly.toml, but you can say y to tweak the settings and change the name.

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