3.0 KiB
How to Deploy Silverstripe
How to deploy a Silverstripe project with zero downtime?
- First, install the Deployer.
- Second, require
recipe/silverstripe.php
recipe into your deploy.php or deploy.yaml file. - Third, and now you can have a zero downtime deployment!
Did you know that you can deploy Silverstripe project with a single command? Just execute dep deploy
.
Something went wrong? Just run dep rollback
to rollback your changes.
Also, you can take an advantages of the Deployer's CLI to deploy your project.
Also, another feature of the Deployer is provisioning. Take any server, and run dep provision
command.
This command will configure webserver, databases, php, https, and more.
You will get everything you need to run your Silverstripe project.
Deployer does next steps to deploy Silverstripe:
- Displays info about deployment
- Prepares host for deploy
- Locks deploy
- Prepares release
- Updates code
- Creates symlinks for shared files and dirs
- Makes writable dirs
- Installs vendors
- Runs /dev/build?flush=all
- Creates symlink to release
- Unlocks deploy
- Cleanup old releases
The silverstripe recipe is based on the common recipe.
Configuration
shared_assets
shared_dirs
Overrides shared_dirs from recipe/deploy/shared.php
.
Silverstripe shared dirs
[
'{{shared_assets}}'
]
writable_dirs
Overrides writable_dirs from recipe/deploy/writable.php
.
Silverstripe writable dirs
[
'{{shared_assets}}'
]
silverstripe_cli_script
Silverstripe cli script
Tasks
silverstripe:build
Runs /dev/build.
Helper tasks
silverstripe:buildflush
Runs /dev/build?flush=all.
deploy
Deploys your project.
Main task
This task is group task which contains next tasks: