Skip to main content
Version: 7.x

How to Deploy a Silverstripe Project

require 'recipe/silverstripe.php';

Source

Deployer is a free and open source deployment tool written in PHP. It helps you to deploy your Silverstripe application to a server. It is very easy to use and has a lot of features.

Three main features of Deployer are:

  • Provisioning - provision your server for you.
  • Zero downtime deployment - deploy your application without a downtime.
  • Rollbacks - rollback your application to a previous version, if something goes wrong.

Additionally, Deployer has a lot of other features, like:

  • Easy to use - Deployer is very easy to use. It has a simple and intuitive syntax.
  • Fast - Deployer is very fast. It uses parallel connections to deploy your application.
  • Secure - Deployer uses SSH to connect to your server.
  • Supports all major PHP frameworks - Deployer supports all major PHP frameworks.

You can read more about Deployer in Getting Started.

The deploy task of Silverstripe consists of:

The silverstripe recipe is based on the common recipe.

Configuration

shared_assets

Source

Default value
if (test('[ -d {{release_or_current_path}}/public ]') || test('[ -d {{deploy_path}}/shared/public ]')) {
return 'public/assets';
}
return 'assets';

shared_dirs

Source

Overrides shared_dirs from recipe/deploy/shared.php.

Silverstripe shared dirs

Default value
[
'{{shared_assets}}'
]

writable_dirs

Source

Overrides writable_dirs from recipe/deploy/writable.php.

Silverstripe writable dirs

Default value
[
'{{shared_assets}}'
]

silverstripe_cli_script

Source

Silverstripe cli script

Autogenerated

The value of this configuration is autogenerated on access.

Tasks

silverstripe:build

Source

Runs /dev/build.

Helper tasks

silverstripe:buildflush

Source

Runs /dev/build?flush=all.

deploy

Source

Deploys your project.

Main task

This task is group task which contains next tasks: