dist/webroot/
A generated, gitignored webroot of relative symlinks into the checkout. Point a
production nginx root at it to expose only web-reachable files: scripts/,
upgrades/*.sql, vendor/, docs/, tests/ etc. stay outside it.
All build output is generated in the checkout, not in dist/webroot/, so
deployments whose nginx root is the checkout root keep working unchanged.
./devbox run build # = devbox.d/bin/jethro_build: compile + production vendor/ (composer --no-dev) + dist/webroot/ links
./devbox run build --with-dev # keep require-dev packages (use this in a dev workspace)
./devbox run compile # = devbox.d/bin/jethro_compile: bundles + version.txt only
Then, once per install, create conf.php from conf.php.sample in the checkout
root. dist/webroot/conf.php is a symlink to it, created by every build even before
conf.php exists, so both webroots and scripts/*.php read the same file. Rebuilds
never create, delete or modify ./conf.php; a build refuses to run if
dist/webroot/conf.php is a regular file rather than the link.
Generated files (in the checkout, gitignored)
| Path | Generated by |
|---|---|
include/version.txt | jethro_compile (from $JETHRO_VERSION or its argument; --nouse skips it) |
resources/css/jethro-$VERSION.css | jethro_compile_css |
resources/js/jethro-$VERSION.js | jethro_compile_js |
vendor/ | composer install in jethro_build, with COMPOSER_ALLOW_SUPERUSER=1 so a root build still runs the cweagans/composer-patches plugin (non-interactive root Composer otherwise disables plugins, leaving extra.patches unapplied) |
dist/webroot/ layout
| Path | Kind |
|---|---|
calls conf.php.sample db_objects favicon.ico hooks include index.php locale members public resources status.php templates views | symlinks to the checkout (../../X) |
upgrades/{upgradefixes,upgradelibs} | symlinks; the upgrade SQL/scripts are not web-reachable |
conf.php | symlink to ../../conf.php, created even while that file is absent |
dist/webroot/ contains only symlinks; every file lives in the checkout.
jethro_build deletes and recreates these symlinks on each run.
Both lookups below go through __DIR__/__FILE__, which PHP resolves through the
include symlink to the checkout, so they find the same files whether nginx serves
the checkout root or dist/webroot/:
include/init.phpreadsdirname(__FILE__).'/version.txt'.include/init.phprequiresdirname(__DIR__).'/vendor/autoload.php', the only place Composer's autoloader is loaded. This is whydist/webroot/needs novendorlink: PHP reachesvendor/through the checkout, and the web cannot reach it at all.
Other webroots
devbox.d/demo/ (dev instance) and devbox.d/functest_jethro_server/ (Playwright)
symlink include and resources to the checkout (../../include/,
../../resources/); functest global-setup.ts runs jethro_compile.
jethro_release runs jethro_build and copies vendor/, include/version.txt
and the bundles from the checkout into the release zip.