dropbits Documentation

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)

ShippedNot shipped
Kernel src/, packs/, assets/, bin/, public/, migrationsentire sites/<id>/data/
Site themes from checkoutsite.db, uploads, secrets, pack config, sessions, backups

Before you ship

  1. Fill deploy.env (hub form or copy from sites/_template/deploy.env.example).
  2. Optional staging: set LOCAL_INSTALL_ROOT, then php playground/bin/deploy <id> and open /install/<id>/ on the hub (php playground/bin/serve). Assemble writes public/.htaccess (front-controller rewrite + DROPBITS_SITE).
  3. Publish: DEPLOY_HOST (needs ssh + rsync) or FTP_*.
  4. Operator tarball of LOCAL_INSTALL_ROOT → backups/ before production.
  5. Prefer --dry-run once.
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/deploy copies kernel+site (does not --delete leftovers).
  • Maintainer ./deploy into LOCAL_INSTALL_ROOT uses rsync --delete and will wipe extra files under that tree.
  • Known archive paths only — do not find across whole DocumentRoot parents.
  • Smoke — hub /install/<id>/, bin/site boot, or php -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/.

See also