feat(web): vercel deployment and vds compose/systemd setup
Add Vercel config with React Router preset, vercel-build script and /api/auth rewrite to the Convex site. Add VDS staging compose for the Rivet engine and runner plus systemd units, deployment plan, and Docker/Vercel ignore rules. Lockfile covers both the web and agents dependency additions.
This commit is contained in:
21
scripts/vercel-build.ts
Normal file
21
scripts/vercel-build.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
|
||||
const appDirectory = "apps/web";
|
||||
const resultPath = `${appDirectory}/.vercel/react-router-build-result.json`;
|
||||
|
||||
execFileSync("pnpm", ["run", "--filter", "web", "build"], {
|
||||
stdio: "inherit",
|
||||
});
|
||||
|
||||
const result = JSON.parse(await readFile(resultPath, "utf8"));
|
||||
|
||||
for (const bundle of Object.values(result.buildManifest.serverBundles)) {
|
||||
bundle.file = `${appDirectory}/${bundle.file}`;
|
||||
}
|
||||
|
||||
await mkdir(".vercel", { recursive: true });
|
||||
await writeFile(
|
||||
".vercel/react-router-build-result.json",
|
||||
`${JSON.stringify(result, null, 2)}\n`
|
||||
);
|
||||
Reference in New Issue
Block a user