Importantly, the TOML file and the Dockerfile are in a child directory of my current working directory and my TOML file is called fly.staging.toml instead of fly.toml.
I do have this section at the top of my TOML file:
app = "nextjs-staging"
# just added this
app_name = "nextjs-staging"
Why am I getting this “the config for your app is missing an app name” error?
The deploy command you’ve listed should work as-is. (Was the same setup and command working before?)
What that error is really saying (I think) is that it doesn’t know the name of the app you’re trying to deploy, so that means it can’t find the TOML to get the name. Although, it should be okay to rename fly.toml and provide a path like you have done.
You’ll see this error if you’re not in right directory relative to the path, like if you inadvertently tried to run it from within /path/to/ (per your example).
If that’s not the problem, you could try adding -a nextjs-staging to the deploy command, and then see if that works or if you get a different error re: the config.
Thanks for the reply. After some more digging around, I had a small bug in my config generator that coincided with when I upgraded the Fly CLI tool… So the problem was entirely mine. Sorry for the rubber ducky debugging!