4fe8d2b72b
- server-install.sh: use GitHub releases URL (avoids channel suffix hack) - GRAV_VERSION bumped to 2.0.0-rc.10 in .env.example - production-todo.md: mark Phase 2.1 env vars as done Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
3.3 KiB
3.3 KiB
Production Todo
Work through Phase 1 first (local fixes and config), then Phase 2 (server deployment and go-live).
Phase 1 — Local fixes before deploy
These are changes made in the local dev environment and committed before anything touches the server.
1.1 Fix server-install.sh for Grav 2.0
server-install.sh had a gap: it copied the grav-admin bundle (which includes user/plugins/admin2/) but then immediately did rm -rf user && git clone ..., wiping admin2. It never got reinstalled because GPM doesn't carry Admin2.
- Updated
server-install.shto stash admin2 before wiping user/, then restore it after - Removed
adminfromplugins.txt— Admin2 replaces it and both conflict on/admin
1.2 Update config for production
- Cleared
custom_base_urlinuser/config/system.yaml(was pointing to local dev IP; empty means Grav auto-detects from the request, which works both locally and in production)
1.3 Content and metadata
- Set
date_starton the Japan & Korea 2026 trip page (user/pages/01.trips/japan-korea-2026/trip.md) - Add
cover_imageto the trip page (used on the trips listing) - Upload actual GPX route file(s) to
/gpx-manageror drop directly intouser/pages/01.trips/japan-korea-2026/ - Run
make content-pushto push all local changes to Gitea
Phase 2 — Server deployment and go-live
2.1 Configure .env
- Set
GRAV_VERSION=2.0.0-rc.10in.env(GitHub releases URL, no channel suffix needed) - Set
REMOTE_HOST,REMOTE_USER,REMOTE_PORT,REMOTE_HOMEfor the production server - Set
USER_REPOandMAIN_REPO(Gitea URLs) - Set
GITEA_HOST,GITEA_USER,GITEA_TOKENfor the install-time clone
2.2 Run the install
make remote-env-setup # writes Gitea token to server temporarily
make remote-install # downloads Grav, clones repos, installs plugins
make remote-env-remove # removes token from server
After install, the script prints the server's SSH public key. Add it as a deploy key to both Gitea repos so make remote-fetch works going forward.
2.3 Verify post-install config
These are committed to the user/ repo and should be present after the clone — just confirm:
user/config/system.yamlhasaccounts.type: flexandpages.type: flexuser/accounts/mischa.yamlhasapi.super: trueandapi.access: true- Old admin plugin is absent from
plugins.txt(not installed)
2.4 Switch to production mode
- Set
twig.cache: trueinuser/config/system.yamlon the server (do not commit this to the repo — it would break local dev) - If Grav can't auto-detect the base URL (e.g. behind a reverse proxy), set
custom_base_urlinuser/config/system.yamlon the server
2.5 Smoke test
- Submit one post via
/post, confirm entry appears in/trips/japan-korea-2026/dailiesimmediately (verifies cache-on-save plugin works withtwig.cache: true)
2.6 Security
- Change admin password to a strong production password
- Confirm
/postrequires login — unauthenticated visitors must not be able to post
2.7 Map tiles
- Register at carto.com and review terms for production traffic (CartoDB dark tiles are free but registration is expected for production use)