A deployment pipeline
This page is for application creators who set up how changes reach production. The goal: the same code and the same steps on every environment, settings that differ per machine kept apart, and a way back when something goes wrong.
Contents
Environments
| Environment | Purpose | Settings |
|---|---|---|
| Development | each developer's machine | EXP_ENV=dev: debug on, file mail transport |
| Test / staging | a copy of production for acceptance | EXP_ENV=test |
| Production | the live site | the base settings |
EXP_ENV names the environment, and every settings file can have a variant for it (site.ini.test.append.php)
(Environment settings and secrets, Settings per environment).
What moves how
| Thing | Moves by |
|---|---|
| Kernel and extensions | Git and Composer (composer.lock committed in the project) |
| Your extension | its Git tag, required by version |
| Settings | Git, without secrets; secrets set per machine |
| Content classes | packages or upgrade scripts, never by clicking twice (Content packages) |
| Tables | your install and upgrade commands (Database schema and .dba files) |
| Content | stays in production; copy production to staging, never the other way |
A release, step by step
- Tests pass in CI (Continuous integration for extensions).
- Deploy to staging, run the upgrade steps, test.
- Production: back up (Backups and restores).
- Maintenance mode if the release changes data (
php bin/php/maintenance.php on --allow-admin). - Update the code (Git pull or
composer update <package>of the project), run the upgrade steps. ./console exp:velocity deploy(--kernelwhen kernel classes changed) (Deploying with Velocity).- Maintenance off; verify.
Rollback
- Code: check out the previous tag and deploy again.
- Data: restore the backup taken before the release when upgrade steps changed data; that is why step 3 comes first.
- Write upgrade steps that only add (columns, classes) where possible, so the previous code still runs on the new data.
Verification
- To do:
exp:velocity status: the server answers;exp:cache statusends in PASS. - To do: The front page, a page of each changed type, the administration.
- To do: The error log is quiet.
- To do: Setup > Upgrade check for file consistency (Upgrade check).
- To do: The about page shows the expected versions.
Related pages
- Deploying with Velocity
- Running a team on Git
- Compatibility, releases and deployment
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.