feat(deploy): uniform per-app Vercel configs (#20) - #23
Closed
kuyacarlo wants to merge 2 commits into
Closed
Conversation
The repo had a single apps/web/vercel.json with hardcoded env plus a legacy builds/routes block on the API, while three Vercel projects (worksight, worksight-api, worksight-docs) each read config from their own Root Directory. Vercel loads exactly one vercel.json per project and never merges a root file with a nested one, so centralization here means uniform per-app configs sharing the same workspace primitives. - apps/web: nextjs preset, pnpm --filter build, telemetry off, no outputDirectory override (preset default is correct) - apps/api: drop legacy builds/routes, which disabled Vercel's install and build steps entirely; output dist - apps/docs: same shape, output .vitepress/dist - remove committed NEXT_PUBLIC_* values incl. the Supabase anon key; env stays dashboard-managed per environment - doc/DEPLOYMENT.md + README: per-project table matching the applied dashboard settings (Root Directory, canary, skip-unaffected), and an honest note that the API still lacks a serverless handler Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks
Contributor
Author
|
Rolled up into #27 ( |
pnpm --filter <pkg> build runs only that package's script and does not build its workspace dependencies first, so nest build fails with TS2307 on @worksight/common in a clean Vercel checkout. Turbo's dependsOn: ["^build"] handles the ordering. Caught by the worksight-api preview deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
Merged
5 tasks
Contributor
Author
|
Rolled into #27 (merged to canary). Closing child PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #20 (repo-side). Aligns committed Vercel config with the three real Vercel projects instead of one app-local file plus a dead legacy API config.
apps/web/vercel.json: Next.js preset,pnpm install --frozen-lockfile,pnpm --filter @worksight/web build, telemetry off. Dropped theoutputDirectoryoverride (thenextjspreset resolves it correctly relative to Root Directory).apps/api/vercel.json: removed the legacybuilds/routesblock, which silently disabled Vercel's install and build steps, sodist/main.jswas never produced. Now zero-config withdistoutput.apps/docs/vercel.json: same shape,.vitepress/distoutput.NEXT_PUBLIC_*values, including the Supabase anon key. Env is dashboard-managed per environment. (The key is a public anon key guarded by RLS, but it should not live in the repo; it remains in git history, so rotate if you want it gone.)doc/DEPLOYMENT.md+README.md: per-project table with the actual Root Directory values and dashboard steps, plus an honest note that the API has no serverless handler yet (main.tscallsapp.listen()), so Docker remains its working path.Why not a single root
vercel.jsonVercel loads exactly one
vercel.jsonper project — the one at that project's dashboard Root Directory — and never merges a root file with a nested one. One project also builds one output. So three targets need three configs; "centralized" means uniform, not shared.Dashboard state (already applied)
worksightapps/webpnpm install --frozen-lockfilepnpm --filter @worksight/web buildworksight-apiapps/apipnpm --filter @worksight/api builddistworksight-docsapps/docspnpm --filter @worksight/docs build.vitepress/distAll three: production branch
canary, source files outside Root Directory enabled, skip-deploys-for-unaffected-projects enabled. The committed files now match these settings, so dashboard and repo no longer drift.Test plan
vercel.jsonfiles parse as valid JSONpnpm --filter @worksight/api buildsucceeds (nest build)apps/webStacked on
feat/mvp-stabilize(#21).Made with Cursor