From 39e58977194ddaeeb114ff65af54bbcb750b84fb Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Thu, 26 Feb 2026 00:18:34 +0000 Subject: [PATCH] Clarify config path resolution when using custom working directory (#1991) Document that --config and --dockerfile paths are relative to the working directory (build context), not the current directory. Adds a new "Combining options" section with a concrete example. --- launch/monorepo.html.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/launch/monorepo.html.md b/launch/monorepo.html.md index d7a2884e00..698c8c6073 100644 --- a/launch/monorepo.html.md +++ b/launch/monorepo.html.md @@ -45,6 +45,32 @@ fly deploy --build-target api fly deploy --build-target worker ``` +## Combining options + +When you specify a working directory, the `--config` and `--dockerfile` paths are relative to the working directory (build context), not your current directory. + +For example, given this structure: + +``` +repo/ +├── flyio/ +│ └── my-app.toml +└── my-app/ + └── Dockerfile +``` + +This won't work, because `./flyio/my-app.toml` doesn't exist inside `./my-app`: + +```cmd +fly deploy ./my-app --config ./flyio/my-app.toml +``` + +Instead, use a path relative to the working directory: + +```cmd +fly deploy ./my-app --config ../flyio/my-app.toml +``` + ## Examples **Use a different fly.toml file per environment**