Files
multica/apps
Bohan Jiang f9bc845d11 docs(self-host): add Upgrading section to the self-host quickstart (MUL-5190) (#5814)
* docs(self-host): add Upgrading section to the self-host quickstart (MUL-5190)

The quickstart had no upgrade section — the only mention of upgrades was a
side note that migrations run automatically. Community users had to be walked
through it by hand every time, and the two circulating recipes (`make selfhost`
vs bare `docker compose pull && up -d`) were never documented as equivalent.

Adds an `Upgrading` section between Step 7 and the Kubernetes section covering:

- both command forms, and that `make selfhost` is a wrapper around them
- what `git pull` actually updates (the compose file, not the image version)
- the `MULTICA_IMAGE_TAG` pinning trap — pinned `.env` silently blocks upgrades
- `.env` is only generated when missing, never overwritten
- Postgres backup before upgrading
- migrations run on backend startup, with the log command to watch them
- verify with `/readyz`, not `/health` (liveness passes on failed migrations)
- cross-reference to the existing Kubernetes upgrade path instead of duplicating

Synced to the zh / ja / ko translations.

Co-authored-by: multica-agent <github@multica.ai>

* docs(self-host): fix upgrade guidance for k8s pull policy and pg_dump (MUL-5190)

Review follow-ups on the new Upgrading section.

1. The Kubernetes upgrade path was wrong. Both the new section and the
   pre-existing Kubernetes section presented `kubectl rollout restart` as a way
   to pull new images, but the chart ships `pullPolicy: IfNotPresent`
   (deploy/helm/multica/values.yaml), so a node that already cached the tag
   reuses the old image and the restart silently changes nothing — the same
   failure mode as a pinned MULTICA_IMAGE_TAG. `helm upgrade` with an updated
   `images.*.tag` is now the primary path; the floating-tag route is documented
   only with the `pullPolicy: Always` prerequisite it requires.

2. The Postgres backup masked `pg_dump` failures. `pg_dump … | gzip > out.gz`
   takes the pipeline's exit status from gzip, so a failed dump exits 0 and
   leaves a valid, empty 20-byte archive. Now redirects to a file first so
   pg_dump's own status gates compression via `&&`, with a callout explaining
   why.

3. Dropped the `Makefile:79-107` / `Makefile:80-95` line references. The
   selfhost target actually spans 79-133 and does more than pull + up (creates
   .env when missing, waits on /health, prints a status summary). Reworded to
   "same result on an existing install" and referenced the target by name so
   the claim cannot drift with line numbers.

Applied across all four language versions.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-23 11:21:19 +08:00
..