docs(setup): dev-first workflow — main=production, dev=preview
Fix contradiction: production branch is main (Vercel default), dev auto-deploys previews, promote = ff-only merge dev→main on explicit go-live. Upstream synced into dev, not main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fb4e8f3591
commit
83a9c5a809
+23
-9
@@ -25,9 +25,9 @@ of truth; VNCmail+ is the UI. This repo deploys to **Vercel** as project
|
|||||||
|
|
||||||
| Branch | Role |
|
| Branch | Role |
|
||||||
|--------|------|
|
|--------|------|
|
||||||
| `main` | Tracks upstream Bulwark releases; kept as clean as possible |
|
| `main` | **Production** — Vercel production branch. Only updated by an explicit promote. |
|
||||||
| `dev` | VNC integration + **Vercel production branch (for now)** |
|
| `dev` | Integration + QA — every push auto-deploys a Vercel **preview**. Default working branch. |
|
||||||
| `vnc/*`| Feature branches for UI work |
|
| `vnc/*`| Feature branches for UI work (branch off `dev`, PR into `dev`). |
|
||||||
|
|
||||||
All VNC customization lives under `vnc/` (see `vnc/VNC-CHANGES.md`).
|
All VNC customization lives under `vnc/` (see `vnc/VNC-CHANGES.md`).
|
||||||
|
|
||||||
@@ -35,8 +35,8 @@ All VNC customization lives under `vnc/` (see `vnc/VNC-CHANGES.md`).
|
|||||||
|
|
||||||
1. **New Project** → import `brvncde-dotcom/vncmail-plus`.
|
1. **New Project** → import `brvncde-dotcom/vncmail-plus`.
|
||||||
2. Project name: **`vncmail-plus`** (display "VNCmail+"). Framework: Next.js (auto).
|
2. Project name: **`vncmail-plus`** (display "VNCmail+"). Framework: Next.js (auto).
|
||||||
3. **Settings → Git → Production Branch = `dev`** (move to `main` only when you
|
3. **Settings → Git → Production Branch = `main`** (Vercel's default for this repo).
|
||||||
cut a real prod domain).
|
`dev` and `vnc/*` pushes deploy as previews.
|
||||||
4. **Settings → Environment Variables:** paste from `vnc/vercel.env.template`.
|
4. **Settings → Environment Variables:** paste from `vnc/vercel.env.template`.
|
||||||
- Generate the secret: `openssl rand -base64 32`
|
- Generate the secret: `openssl rand -base64 32`
|
||||||
- Mark `SESSION_SECRET` as **Sensitive**.
|
- Mark `SESSION_SECRET` as **Sensitive**.
|
||||||
@@ -49,13 +49,27 @@ Add a subdomain of the Stalwart parent, e.g. `mail.sandbox.vnc.de` or
|
|||||||
`vncmailplus.sandbox.vnc.de`, in Vercel → Domains. Same parent domain keeps
|
`vncmailplus.sandbox.vnc.de`, in Vercel → Domains. Same parent domain keeps
|
||||||
everything tidy and avoids any future cross-origin edge cases.
|
everything tidy and avoids any future cross-origin edge cases.
|
||||||
|
|
||||||
## Syncing upstream later
|
## Deploy workflow (dev-first — ALWAYS)
|
||||||
|
|
||||||
|
Same flow as every other VNC/SRC repo:
|
||||||
|
|
||||||
|
1. Work on `dev` (or `vnc/*` → PR into `dev`). Every push to `dev` auto-deploys a **preview**. QA there.
|
||||||
|
2. **Promote to production only on explicit go-live** — merge `dev` → `main`:
|
||||||
|
```bash
|
||||||
|
git log dev..main # MUST be empty — main must have nothing dev lacks (else prod would revert)
|
||||||
|
git checkout main && git merge --ff-only dev
|
||||||
|
git push origin main # Vercel deploys main → production
|
||||||
|
git checkout dev
|
||||||
|
```
|
||||||
|
Never push straight to `main`. Never let a dev→main merge silently revert prod.
|
||||||
|
|
||||||
|
## Syncing upstream (Bulwark releases)
|
||||||
|
|
||||||
|
Bring upstream into `dev` (NOT main), integrate on a preview, then promote as above:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git checkout main && git merge upstream/main # bring in new Bulwark release
|
git checkout dev && git merge upstream/main # resolve conflicts via vnc/VNC-CHANGES.md; QA on preview
|
||||||
git checkout dev && git merge main # integrate; resolve via vnc/VNC-CHANGES.md
|
|
||||||
git push origin main dev # Vercel redeploys dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Auth
|
## Auth
|
||||||
|
|||||||
Reference in New Issue
Block a user