Skip to content

Open source personal finance application

docs(deployment): clarify vercel.json vs dashboard settings split

Ilya Komicheva6762aa4fcdd
diff --git a/docs/content/en/2.development/04.deployment.md b/docs/content/en/2.development/04.deployment.md
index b34093e9..8aceb1d5 100644
--- a/docs/content/en/2.development/04.deployment.md
+++ b/docs/content/en/2.development/04.deployment.md
@@ -14,6 +14,19 @@ Finapp is a pnpm workspace monorepo. Both the app and docs deploy from the same
Create **two projects** in Vercel, both pointing to the same GitHub repository.
+::callout{icon="i-lucide-info" color="info"}
+**Settings split: file vs project.** Most build settings live in each project's `vercel.json` (`framework`, `buildCommand`, `installCommand`, `outputDirectory`, `ignoreCommand`, `env`, `rewrites`). **Root Directory cannot live in `vercel.json`** because Vercel needs it to know where to look for the file. Set it once in the project's dashboard (Settings → General → Root Directory) or via the API:
+
+```bash
+TOKEN=$(jq -r .token "$HOME/Library/Application Support/com.vercel.cli/auth.json")
+curl -X PATCH \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ "https://api.vercel.com/v9/projects/<project-name>?teamId=<team-id>" \
+ -d '{"rootDirectory":"docs"}'
+```
+::
+
### App Project
| Setting | Value |
diff --git a/docs/content/ru/2.development/04.deployment.md b/docs/content/ru/2.development/04.deployment.md
index 1b6afd71..dbcb48be 100644
--- a/docs/content/ru/2.development/04.deployment.md
+++ b/docs/content/ru/2.development/04.deployment.md
@@ -14,6 +14,19 @@ Finapp — это монорепа на pnpm workspaces. Приложение и
Создайте **два проекта** в Vercel, оба указывают на один GitHub-репозиторий.
+::callout{icon="i-lucide-info" color="info"}
+**Где что настраивать: файл vs проект.** Большинство build-настроек живут в `vercel.json` каждого проекта (`framework`, `buildCommand`, `installCommand`, `outputDirectory`, `ignoreCommand`, `env`, `rewrites`). **Root Directory нельзя положить в `vercel.json`**, потому что Vercel должен знать его заранее, чтобы понять где искать файл. Ставится один раз в dashboard (Settings → General → Root Directory) или через API:
+
+```bash
+TOKEN=$(jq -r .token "$HOME/Library/Application Support/com.vercel.cli/auth.json")
+curl -X PATCH \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ "https://api.vercel.com/v9/projects/<project-name>?teamId=<team-id>" \
+ -d '{"rootDirectory":"docs"}'
+```
+::
+
### Проект приложения
| Настройка | Значение |