Unable to deploy, "no platform set"

Hi, I am experiencing same as in this thread, which unfortunately seems to be automatically locked which forces me to create a new thread: Unable to deploy, "no platform version set"

My use case is very simple. I want to (via the fly CLI)

  1. Create an application
  2. Add a secret env variable BORE_SECRET
  3. Deploy the docker image ekzhang/bore

However, I get

❯ fly deploy -a ahdiashdiasdhiasd -i ekzhang/bore
==> Verifying app config
Error Undeployed app 'ahdiashdiasdhiasd ' has no platform version set

Help!

Also: If this has an easy answer, please improve the error message so that it becomes actionable. I.e. how do I set the platform version for the app?

EDIT
I tried enabling v2 like this

❯ fly orgs apps-v2 default-on personal
Apps V2 default on: true

and then create a new app

❯ fly apps create --generate-name -o personal
New app created: divine-thunder-8149
Projects/temp/foo
❯ fly deploy -a divine-thunder-8149 -i ekzhang/bore
==> Verifying app config
Error failed to grab app config from existing machines, error: could not create a fly.toml from any machines :-(
No machines configured for this app

Am I missing some step? PS. I do not want to create a local fly.toml if I don’t have to

Hi @eipe

You need to create a fly.toml file if you want to deploy apps that way.

Okey, but is there another way then? I just want to deploy a docker image from the registry (and provide it with a secret). Can I do this without a fly.toml?

There’s a lower level API that you can use but it’s a bit more complicated so make sure to thoroughly read through the docs.

fly deploy wants a TOML config file to be involved, and is meant as a nice way to manage all the VMs in an app.

fly machine run may be what you’re looking for; fly machine commands give you more granular control over Machines without going down to API level, and they don’t require an app-wide config.

We don’t have the most concise or up-to-date docs on using fly machine commands, but we have this blog post and this rambling guide*, which both predate the ability to use fly deploy with Machines.

*I’m allowed to badmouth it, since I wrote it

Thank you @charsleysa and @catflydotio

I ended up using fly launch instead and accept the the fly.toml :slight_smile:

1 Like

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