Deploying on another computer -> created new app

Hello,

I have sucessfully deployed an app to fly.io. Hurray.
But then I put the project on github, checked it out on another computer and ran fly deploy again. Fly created a new app, though fly.toml still contains the same app name.

What do I have to do so that it deploys to the “old” app and doesn’t create a new one?

Thanks for your help.

Did you commit the fly.toml file to git?

Yes.

fly deploy is the command you want. That uses the existing fly.toml and creates a new release. fly launch creates a new app. This distinction is confusing, sometimes, and we should be improving it.

Thanks, but as I wrote, I have used fly deploy

Whoops! I missed that. fly deploy should never create a new application, I didn’t even think that was possible! Can you paste your fly.toml here? And also try running fly deploy again and paste the logs?

Maybe I have to apologize…
I have now changed some text in my code, ran fly deploy and my website has changed.

But why have I thought that my app got deployed into a new app name?

fly deploy began with

Deploying petal
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 4000
Remote builder fly-builder-ancient-fire-1743 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.10 linux x86_64
Sending build context to Docker daemon  204.5MB
...

(so I thought fly-builder-ancient-fire-1743 is my new app name)

and it ends with

1 desired, 1 placed, 1 healthy, 0 unhealthy [health checks: 1 total, 1 passing]
--> v25 deployed successfully

And because my dashboard shows an additional box:

Apps that haven’t been deployed

Can I safely delete that? (Why isn’t it automatically?)

Ah, that’s the builder we use for remote Docker builds. We keep it around because it has a Docker cache. This makes the next build faster. We don’t bill you for it, it’s just there for you to look at. :slight_smile:

It’s safe to delete, though, if you want. We’ll create a new one if we need to.

I kept deleting this file until now assuming that’s why I was losing my app due to free tier restrictions. I’m glad I don’t have to keep deleting it now as it was adding a few steps to my process that slowed me down.