fly launch is adding stuff to my fly.toml

I have a python app with the following fly.toml:

app = "myapp"
primary_region = "lax"
kill_signal = "SIGINT"
kill_timeout = "5s"

[experimental]
  auto_rollback = true

[processes]
  first = "python3 main.py --first"
  second = "python3 main.py --second"
  third = "python3 main.py --third"

[[vm]]
  cpu_kind = "shared"
  cpus = 1
  memory_mb = 1024
  processes = ["first", "second", "third"]

I am trying to launch (but not deploy) the app using this command:

fly launch --name myapp --org myorg --region lax --copy-config --no-deploy

When I do that, my fly.toml gets automatically updated to add the following:

[build]

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]

But I don’t need or want an http service or any inbound connectivity.

And in any case, it doesn’t launch, it errors out with following message:

Wrote config file fly.toml
Validating fly.toml
Platform: machines
Service specifies 'app' as one of its processes, but no processes are defined with that name; update fly.toml [processes] to add 'app' process or remove it from service's processes list

   ✘invalid app configuration
Error: invalid configuration file: App configuration is not valid

Any ideas? Thanks!

Bump to keep this topic open

Cross-posted here: fly launch is adding stuff to my fly.toml · Issue #3140 · superfly/flyctl · GitHub

The easiest thing to do here is just manually remove the http_service section, then fly deploy (when you’re ready). Even though the launch command has errored out, your app has been created and is awaiting its first deploy.

EDIT: If you want to prevent the http_service from being generated by fly launch, you can say yes to Do you want to tweak these settings before proceeding? and set “Port” blank or equal to zero. Yes, there should be a flag to make this unnecessary. We’re looking into it.

1 Like

What are you trying to do? Create a new app? Create a clone of the existing app? What’s the use case?
If you just want a new empty app, you can use fly apps create <name>.

Thanks @john-fly setting port to blank did the trick! Looking forward to the flag :slight_smile:

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