feat: enable marketing site registration and launch-prompt preservation (T12)
This commit is contained in:
52
VIBNDEV.md
52
VIBNDEV.md
@@ -82,20 +82,56 @@ pnpm dev
|
||||
|
||||
`.env.local` needs: `DATABASE_URL`, `NEXTAUTH_URL`, `NEXTAUTH_SECRET`, `NEXT_PUBLIC_DEV_LOCAL_AUTH_EMAIL`, `NEXT_PUBLIC_DEV_BYPASS_PROJECT_AUTH`, `GOOGLE_API_KEY`, `COOLIFY_*`, `GITEA_*`, `VIBN_SECRETS_KEY`, plus optionally `VIBN_CHAT_PROVIDER=deepseek` and `DEEPSEEK_API_KEY`.
|
||||
|
||||
## Deploy vibn-frontend
|
||||
## Git topology & deploying apps
|
||||
|
||||
**`master-ai` is ONE git repo.** `vibn-frontend/`, `vibn-agent-runner/`, and `vibn-api/` are **subfolders** of it
|
||||
(not separate repos). `vibn-code/` is a **nested submodule** with its own `.git`. Each cloud app builds from its
|
||||
**own Gitea remote**, from the matching subfolder (Coolify's base-directory points at the subfolder):
|
||||
|
||||
| App | Coolify app uuid | Push remote (run from anywhere in `master-ai`) | Builds from subfolder |
|
||||
|---|---|---|---|
|
||||
| vibn-frontend | `y4cscsc8s08c8808go0448s0` | `coolify_gitea` | `vibn-frontend/` |
|
||||
| vibn-agent-runner | `jss08wssogw4kw8gok0sk0w0` | `coolify_agent_gitea` | `vibn-agent-runner/` |
|
||||
| vibn-api | `m84cc4wsc0ckws8g8k44kkk8` | `coolify_api_gitea` | `vibn-api/` |
|
||||
|
||||
- `master-ai.git` (`gitea` remote) and GitHub (`origin`) are **share/mirror only — builds do NOT use them.**
|
||||
- Secret `.env*` files at the repo root are **gitignored** (verified). Never commit them.
|
||||
- These remotes share history, so `git push <remote> HEAD:main` fast-forwards (no force needed).
|
||||
|
||||
### Deploy steps (any app)
|
||||
|
||||
```sh
|
||||
cd /Users/markhenderson/master-ai/vibn-frontend
|
||||
git add -A && git commit -m "message" && git push origin main
|
||||
cd /Users/markhenderson/master-ai
|
||||
# 1. Commit the change (stage only the app's subfolder to keep commits scoped)
|
||||
git add vibn-agent-runner/ && git commit -m "message"
|
||||
|
||||
# Then trigger deploy (correct endpoint for Coolify v4):
|
||||
# 2. Push to the app's deploy remote's main branch
|
||||
git push coolify_agent_gitea HEAD:main # runner
|
||||
# git push coolify_gitea HEAD:main # frontend
|
||||
|
||||
# 3. Trigger the Coolify deploy (correct endpoint for Coolify v4)
|
||||
source /Users/markhenderson/master-ai/.coolify.env
|
||||
curl -s -X POST \
|
||||
-H "Authorization: Bearer $COOLIFY_API_TOKEN" \
|
||||
"$COOLIFY_URL/api/v1/deploy?uuid=y4cscsc8s08c8808go0448s0"
|
||||
curl -s -X POST -H "Authorization: Bearer $COOLIFY_API_TOKEN" \
|
||||
"$COOLIFY_URL/api/v1/deploy?uuid=jss08wssogw4kw8gok0sk0w0" # runner uuid; use the frontend uuid for the frontend
|
||||
```
|
||||
|
||||
**Note:** `/api/v1/applications/{uuid}/start` or `/deploy` returns 404 on Coolify v4. The correct deploy path is `/api/v1/deploy?uuid=...`. Add `&force=true` to force a full rebuild.
|
||||
**Notes:**
|
||||
- `/api/v1/applications/{uuid}/start` or `/deploy` returns 404 on Coolify v4. The correct deploy path is `/api/v1/deploy?uuid=...`. Add `&force=true` to force a full rebuild.
|
||||
- The runner builds from `vibn-agent-runner/Dockerfile`, which runs `npm run build` (tsc) on `src/` — you do **not** need to hand-build `dist/` for the deploy (but keeping `dist/` in sync is tidy).
|
||||
|
||||
## The agent runner (chat backend)
|
||||
|
||||
`vibn-agent-runner` (FQDN `https://agents.vibnai.com`, port 3333) is what actually answers desktop/web chat:
|
||||
|
||||
- Frontend `POST /api/projects/:id/agent/sessions` inserts an `agent_sessions` row and fire-and-forgets
|
||||
`POST {AGENT_RUNNER_URL}/agent/execute` to the runner. The runner clones the project's Gitea repo, runs the
|
||||
**Coder** agent, and `PATCH`es output/status back to the session row (auth via `x-agent-runner-secret`).
|
||||
- The desktop/web then polls `GET /api/projects/:id/agent/sessions/:sid` for streamed output.
|
||||
- **Model:** set by the runner env `GEMINI_MODEL` (currently `gemini-3.1-pro-preview`). The desktop model picker
|
||||
is cosmetic until model-passthrough is wired.
|
||||
- Health check: `curl https://agents.vibnai.com/health` → `{"status":"ok"}`.
|
||||
- The happy path of `/agent/execute` has **no logging** — only failures log. To inspect:
|
||||
`gcloud compute ssh coolify-server-mtl --zone=northamerica-northeast1-a --project=master-ai-484822 --command="sudo docker logs --tail 100 jss08wssogw4kw8gok0sk0w0-<suffix>"` (find the exact container name with `docker ps`).
|
||||
|
||||
## Coolify API Reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user