I had an app that I destroyed due to problems during testing. Now I would like to recreate it.
However, whatever I try, it seems I’m not able to simply bootstrap the app from the existing toml file. Instead, the cli always tries to modify the toml in one way or other:
❯ fly init
***An existing configuration file has been found.
? Overwrite file '/htdocs/foo/fly.toml' No
❯ fly launch
An existing fly.toml file was found for app evcc
? Would you like to copy its configuration to the new app? (y/N)
You can recreate the app from existing toml by simply choosing yes to copy the configuration,
for example:
$ fly launch master ✱
An existing fly.toml file was found for app withered-meadow-6338
? Would you like to copy its configuration to the new app? Yes
Creating app in /go-example
Scanning source code
Detected Go app
Using the following build configuration:
Builder: paketobuildpacks/builder:base
Buildpacks: gcr.io/paketo-buildpacks/go
Unfortunately, this will create a new app with an arbitrary (domain) name- exactly what I want to avoid! The toml already has the app name and exactly that should be recreated.
I probably agree with you. The fly launch UX is something we’re still working through, it would make sense to use that app name if it doesn’t exist already.
Worth noting: one reason I had to scrap the app to start from scratch was that the ENV settings from the toml did not get updated. My app was constantly seeing an old ENV setting even when I rebuilt/deployed the container. After destroy/launch I’m getting the new settings. Seems there is something odd in the deploy process with toml-supplied environment.