Motivation
LARAVEL_OPTIMIZE_ENABLED already runs config:cache route:cache view:cache at startup. Other apps need similar pre-flight work:
- Statamic:
php please stache:warm (without it, first request is 500 / 30s+)
- WordPress with object cache:
wp cache flush after cache-driver swap
- Custom apps:
php artisan custom:warmup, make seed, etc.
Right now there's no clean way to add app-specific warmup commands without writing a custom entrypoint and giving up cbox-init's lifecycle.
Proposal
Two complementary additions:
1. Generic APP_WARMUP_COMMANDS env var
APP_WARMUP_COMMANDS="php please stache:warm; php artisan event:cache"
Semicolon-separated. Run sequentially before the HTTP listener is marked ready. Failure surfaces in logs but is configurable (APP_WARMUP_ALLOW_FAILURE, mirroring LARAVEL_MIGRATE_ALLOW_FAILURE).
2. Framework-aware shortcuts (optional sugar)
STATAMIC_STACHE_WARM=true
STATAMIC_STATIC_WARM=true
Mirrors the existing LARAVEL_* pattern.
Acceptance criteria
Motivation
LARAVEL_OPTIMIZE_ENABLEDalready runsconfig:cache route:cache view:cacheat startup. Other apps need similar pre-flight work:php please stache:warm(without it, first request is 500 / 30s+)wp cache flushafter cache-driver swapphp artisan custom:warmup,make seed, etc.Right now there's no clean way to add app-specific warmup commands without writing a custom entrypoint and giving up
cbox-init's lifecycle.Proposal
Two complementary additions:
1. Generic
APP_WARMUP_COMMANDSenv varSemicolon-separated. Run sequentially before the HTTP listener is marked ready. Failure surfaces in logs but is configurable (
APP_WARMUP_ALLOW_FAILURE, mirroringLARAVEL_MIGRATE_ALLOW_FAILURE).2. Framework-aware shortcuts (optional sugar)
STATAMIC_STACHE_WARM=trueSTATAMIC_STATIC_WARM=trueMirrors the existing
LARAVEL_*pattern.Acceptance criteria
APP_WARMUP_COMMANDSruns before health checks start succeedingprocess: warmup)APP_WARMUP_ALLOW_FAILUREhonouredLARAVEL_OPTIMIZE_ENABLED