Content-owned deploy
Routine deploy = ship code to the install, then migrate schema on the install. The product CLI does not upload sites/<id>/data/ by default.
Normative companion: docs/DEPLOY.md.
Default (CONTENT_OWNED=1)
| Shipped | Not shipped |
|---|---|
Kernel src/, packs/, assets/, bin/, public/, migrations | entire sites/<id>/data/ |
| Site themes from checkout | site.db, uploads, secrets, pack config, sessions, backups |
Before you ship
- Fill
deploy.env(hub form or copy fromsites/_template/deploy.env.example). - Optional staging: set
LOCAL_INSTALL_ROOT, thenphp playground/bin/deploy <id>and open/install/<id>/on the hub (php playground/bin/serve). Assemble writespublic/.htaccess(front-controller rewrite +DROPBITS_SITE). - Publish:
DEPLOY_HOST(needsssh+rsync) orFTP_*. - Operator tarball of
LOCAL_INSTALL_ROOT→backups/before production. - Prefer
--dry-runonce.
php playground/bin/deploy <id> --dry-run
php playground/bin/deploy <id>
Maintainer host-local rotate (./deploy --remote) is an optional shortcut — see docs/DEPLOY.md. Not required for clone-and-run. Unison is not a Dropbits transport.
Before first deploy (existing DocumentRoot)
Archive pre-CMS files outside the install root (sibling <install>-legacy/). Never ._legacy/ *inside* LOCAL_INSTALL_ROOT.
- Product
php playground/bin/deploycopies kernel+site (does not--deleteleftovers). - Maintainer
./deployintoLOCAL_INSTALL_ROOTusesrsync --deleteand will wipe extra files under that tree. - Known archive paths only — do not
findacross whole DocumentRoot parents. - Smoke — hub
/install/<id>/,bin/site boot, orphp -S+router-dev.php. Do not hunt nginx/apache vhosts unless the task actually requires it.
Never default to --with-content
Escape hatch only for rare bootstrap / intentional DB push (CONTENT_OWNED=0 or --with-content on the host-local recipe). Do not make that the happy path.
Maintainer remote rotate
Host-local ./deploy --remote moves the live tree aside, rsyncs code (still excluding data/ when content-owned), then restores sites/<id>/data/ from the swap. If restore fails, the swap is left in place — see Troubleshooting. The product CLI (playground/bin/deploy) publishes in place and excludes data/.