Write the adopted team Rule before the server listens so deploy cannot feature the old draft body.

This commit is contained in:
adilallo committed 2026-11-12 15:55:36 -07:00
1 parent 29a8d2b32b
commit 1ec1f48d35
8 files changed
+232 -86

No files matched your search

+4 -3
View File
@@ -321,8 +321,8 @@ the base image's `node` user (uid 1000), installs `gosu` for the
privilege drop, and symlinks `.next/cache → /tmp/next-cache` so
Next.js ISR works on Cloudron's read-only rootfs. `start.sh` runs as
root to chown `/app/data` (localstorage mount), then drops to
`node:node`, applies `prisma migrate deploy`, and execs the Next.js
standalone server.
`node:node`, applies `prisma migrate deploy`, writes the adopted team
Rule, and execs the Next.js standalone server.
### One-time setup (per operator)
@@ -438,7 +438,8 @@ production env vars, and verify the vertical slice before apex cutover
already installed.) Cloudron provisions **postgresql**, **sendmail**, and
**localstorage** addons from the manifest, pulls the image (no registry
credentials needed), and starts the container. `scripts/start.sh` chowns
`/app/data`, runs `prisma migrate deploy`, then execs the Next.js server.
`/app/data`, runs `prisma migrate deploy`, writes the adopted team Rule,
then execs the Next.js server.
4. **Set manual env vars** (Cloudron does not inject these):
```bash
cloudron env set --app staging.communityrule.info \
+5 -2
View File
@@ -94,7 +94,8 @@ credentials on the host), restarts the container, and runs
1. `chown`s `/app/data` (localstorage mount),
2. runs **`prisma migrate deploy`**,
3. execs the Next.js standalone server.
3. writes the adopted team Rule (document and visibility together),
4. execs the Next.js standalone server.
Watch the app **Logs** tab in the Cloudron dashboard for a clean migration and
`Listening on port 3000`.
@@ -121,7 +122,9 @@ deploying a new image. See [`backend-roadmap.md` §8](backend-roadmap.md#8-prism
### 3.4 Seed data (not every deploy)
Template + facet seed (`MethodFacet` rows for create-flow “Recommended” tags)
is **not** applied at boot. Run once per environment after first install, or
is **not** applied at boot. The adopted team Rule is the exception: container
start writes that one row so the public catalog does not keep the old draft
body. Run the template seed once per environment after first install, or
when recommendations return all-zero scores:
```bash