docs: capture local Grav core upgrade + refresh version-authority docs
New learning: docs/solutions/tooling-decisions/upgrade-local-grav-core-rebuild-docker-image.md — the local Grav core is baked into the Docker image (only ./user is bind-mounted), so it upgrades by a Dockerfile URL bump + image rebuild + `docker rm -f` recreate, not the `gpm self-upgrade` the servers use (non-durable in-container). Refreshed three docs this exposed as stale/incomplete: - local-setup.md: rewrote the stale "newer Grav RC" section with the durable rebuild procedure (recreate gotcha, verify, plugin refresh, non-durability note). - deploy-cycle.md: Phase 0 now upgrades the local core; state-model notes the image as a fourth surface beyond the three server layers. - stale-grav-version-blocks-api-plugin-install.md: version-authority surfaces 3 -> 4 (hardcoded Dockerfile URL); clarified .env* GRAV_VERSION governs fresh remote installs only, never the local Docker core. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
This commit is contained in:
@@ -44,13 +44,34 @@ This creates uid 1000 in the container, chowns `/var/www/html` to 1000:1000, and
|
||||
|
||||
---
|
||||
|
||||
## Upgrading to a newer Grav RC
|
||||
## Upgrading the Grav core
|
||||
|
||||
Grav 2.0 is baked into the custom Docker image via `Dockerfile`. The base `getgrav/grav` image ships 1.7 — the `Dockerfile` downloads the 2.0 RC bundle from GitHub and overwrites the core files at build time.
|
||||
The Grav core is baked into the custom Docker image via `Dockerfile`. The base
|
||||
`getgrav/grav` image ships 1.7 — the `Dockerfile` downloads the pinned stable bundle
|
||||
(`grav-admin-v<version>.zip`) from GitHub and overwrites the core files at build time.
|
||||
`docker-compose.yml` volume-mounts only `./user`, so the core lives in the **image
|
||||
layer**. That means you upgrade the core by rebuilding the image, **not** by running
|
||||
`gpm self-upgrade` inside the container — an in-container self-upgrade is lost on the
|
||||
next rebuild. (The servers are the opposite: no image, so they self-upgrade in place.)
|
||||
|
||||
To upgrade:
|
||||
1. Update the bundle URL in `Dockerfile`
|
||||
2. Run `make setup` — Docker rebuilds the image layer automatically
|
||||
1. Bump **both** occurrences of the version in the `Dockerfile` release URL (the
|
||||
`/download/<ver>/` path and the `grav-admin-v<ver>.zip` filename). Note: the
|
||||
`GRAV_VERSION` in `.env*` does **not** drive this build — it only pins fresh
|
||||
*remote* installs.
|
||||
2. Rebuild: `docker compose build grav`.
|
||||
3. Recreate the container. `docker compose up -d` won't replace an already-running
|
||||
container with a fixed `container_name` (it errors `Conflict … name … already in
|
||||
use`), so remove it first — safe because `./user` is a bind mount:
|
||||
```bash
|
||||
docker rm -f intotheeast_grav && docker compose up -d grav
|
||||
```
|
||||
4. Verify: `docker exec -w /var/www/html intotheeast_grav php bin/grav --version`.
|
||||
5. Refresh plugins and clear cache: `make install-plugins` then
|
||||
`docker exec -w /var/www/html intotheeast_grav php bin/grav cache`.
|
||||
|
||||
Full rationale and the server-vs-local contrast:
|
||||
`docs/solutions/tooling-decisions/upgrade-local-grav-core-rebuild-docker-image.md`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user