Deployment Checklist
Repeatable steps to promote VelvetCMS builds to production.
1. Build + dependencies #
This checklist assumes you’re familiar with the commands in CLI → Core Commands.
composer install --no-dev --optimize-autoloader
./velvet module:compile
- Composer autoloader optimization plus the module autoloader keeps bootstrap snappy.
- Run
module:compileafter toggling modules or updating manifests (CI can fail the build if validation errors occur).
2. Cache warm-up #
./velvet cache:clear
./velvet config:clear && ./velvet config:cache
./velvet route:clear && ./velvet route:cache
./velvet optimize
Sequence rationale:
- Clear stale cache files (
storage/cache/*). - Regenerate consolidated
config.php. - Compile routes so
public/index.phploads them instantly. optimizescript warms configs again and checksAPP_ENV/APP_DEBUGsanity.
3. Database migrations #
./velvet migrate --force
- In production you’ll be prompted unless
--forceis passed. Back up data or run inside a transaction for large migrations. - You can scope to module migrations using
--path=modules/acme-blog/database/migrations.
4. Smoke tests #
- Hit
./velvet diagnoseto ensure cache, storage permissions, DB connectivity, content driver, and modules are healthy. - Curl
/themes/<theme>/assets/...to verify the asset route sendsCache-ControlandETagheaders as expected.
5. Runtime toggles #
- Ensure
.envcontainsAPP_ENV=production. Anything else is treated as the permissive “local” mode. - Confirm
APP_DEBUGisfalse(it defaults to false whenAPP_ENV=production, but double-check if you override it manually). - Rotate secrets (DB password, Redis password) through environment variables rather than editing config files.
6. Monitoring hooks #
diagnose --jsonis CI-friendly; stash its output as a deployment artifact.- Tie exception reporting into your logging stack by binding a PSR-3 logger and adding reporters in
config/exceptions.php.
Following these steps gives you deterministic, cache-warmed deployments with module compatibility verified before traffic hits the node.