Update runbook¶
Releases deploy with one command: php artisan fe:update.
What it does, in order: preflight (clean tree, ref resolves), quiesce (the scheduler stops and order export pauses; the web server stays up so orders keep arriving safely in the queue), a database snapshot, code pin, build, forward-only migrations, config cache with two assertions the naive recipe misses (cache file ownership, and a fresh-process read of a tenant value: an exit code of zero proves neither), then unquiesce and a full verify.
If any step fails, the box STAYS quiesced: orders keep queueing, nothing half-deployed touches Sage. Fix forward or roll back, then restart the scheduler timer.
Notices from Keyway (a security notice that says to update, for example) do not ride on releases: they arrive on the install's regular check-in and show in the admin; see Contacts and roles.
Files your install owns¶
Four files are yours, not the release's: the tenant record
(config_slices/tenant.php, written by fe:onboard), the module list, the
linked Shopify app configuration (shopify/shopify.app.toml) and the
generated extension backend URLs. They differ from the shipped skeleton on
every install, by design, and fe:update carries them through a deploy.
When a release changes one of those files too (a new tenant key, for
example), fe:update merges the release's change with your copy using
git's three-way merge, before anything is quiesced. A clean merge deploys;
your pre-update copy is kept under the operator's home (~/.forgesync/fe-update/, readable by nobody else) and fe:rollback
puts it back. A release that only adds keys to the tenant record never
conflicts, and neither does one that only removes keys or changes the
comments beside them: your copy is kept whole and fe:config:migrate adds
any new keys right after the pin, even when they sit next to lines you have
filled; a removed key stays in your record as an inert leaf. A real conflict
(the release changed the value of a line you changed) refuses the update
with nothing touched and names the file; resolve it by hand and run
fe:update again. Never clean
one of these files with git checkout to get past a refusal: that deploys
a blank tenant record and the box stays quiesced at the sentinel check.
A release that adds a setting needs no merge at all: after the code is
pinned, fe:update runs fe:config:migrate, which adds the new leaves to
your tenant record as "not configured". When the new setting is REQUIRED
and you have not set it, the update refuses before anything is quiesced and
prints the fe:settings:set line for each; run them and update again.
Settings you changed in the Shopify admin or with fe:settings:set live in
the database overlay, not in the file, so a deploy never touches them and
config:cache never bakes them. fe:doctor fails if a cache file ever
does carry one.
Where the release comes from¶
The checkout's origin is a bundle file, /opt/fe-bundles/fe-core-main.bundle,
not a repository on the internet. With FORGESYNC_RELEASE_URL set (the
fleet receiver's release address, given at install) and
FORGESYNC_RELEASE_PUBLIC_KEY (Keyway's signing key, also given at install),
fe:update first downloads the current release from the receiver,
authenticated with this install's beacon secret, checks its size and sha256,
verifies Keyway's signature over the bundle against the pinned key, and only
then replaces the bundle file and continues. An unsigned bundle, or one
signed with any other key, is refused: the receiver can store a file, but
only Keyway can make one your server accepts. A
download that fails for any reason stops the deploy before anything is
touched; the previous bundle stays in place. With the variable blank, the
bundle is placed on the server by hand and fe:update behaves exactly as
above from the fetch onward.
Rollback¶
php artisan fe:rollback re-pins the previously deployed release. Code
only, always:
- Database rollback is blocked on purpose (
migrate:rollbackrefuses). Down-migrations destroy data that cannot be rebuilt. Migrations are written additively so older code tolerates newer schema. - If a bad migration itself is the problem, that is a database RESTORE, followed by the order-gap replay (see Backup and restore).
Cadence¶
Quarterly at minimum (platform API version pins require it), plus security advisories per the fleet policy in your engagement terms.
Runtime line¶
The install runs on PHP 8.4 and Laravel 12 (the line moved from 8.2 on
2026-10-22). The runtime changes on its own track, separate from
fe:update:
- Point releases (8.4.x) arrive through the server's unattended
upgrades.
fe-provisionregisters the PHP package origin with unattended-upgrades, so a PHP security release is applied the same way an Ubuntu one is, without anyone logging in. - A new major line is announced in the release notes before any
release requires it. It is applied by re-running
fe-provisionwith the new value ofFE_PHP_VER: the script installs the new line beside the old one, moves the FPM pool and thephpcommand to it in place (the window is the seconds between two FPM reloads; the web server stays up), stops the old line's FPM once nothing else uses it, and prints the two follow-ups:php artisan config:cache && php artisan fe:verifyas the app user, then purge the old line's packages. Nothing in the app tree changes.