Fly Deploy App Name Error

I’m using fly cli to deploy sample project to start. It is a Monorepo and a Node / Express application.

I have two different .toml files to accomdodate two different environments to start.

fly.dev-rally2-api.toml
fly.rally2-api.toml

The example of my fly.dev-rally2-api.toml:

# fly.dev-rally2-api.toml

# fly.toml app configuration file generated for rally2-turborepo"
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
app = "dev-rally2-api"
primary_region = "lax"

[build.args]
  PROJECT="rally2-api"
  ENVIRONMENT="development"
  
# api_gateway
[http_service]
  internal_port = 3000
  force_https = true
  min_machines_running = 0
  processes = ["app"]

I am trying to learn more about how the pieces of Fly come together. As of now, I am forced to run the following to deploy my changes:

fly deploy --config apps/rally2-api/fly.dev-raly2-api.toml -a dev-rally2-api

where -a dev-rally2-api is required in the CLI otherwise I get the following error:

❯ fly deploy --config ./apps/rally2-api/fly.dev-raly2-api.toml
Error: the config for your app is missing an app name, add an app field to the fly.toml file or specify with the -a flag

From my understsanding, the .toml sample above has the app name set appropriately.

Why is it not detecting the app = "dev-rally2-api" in the toml file and requiring me to also specify it in the CLI deploy command?

Hi… There is a typo here (raly2 instead of rally2), although maybe that was a transcription error.

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