Opinionated recipe for deploying SilverStripe projects via Deployer
Opinionated recipe for deploying SilverStripe projects via Deployer.
- Simple to install.
- Configure using yaml and ENV variables.
- Build locally and transfer output onto server.
- Deploy from CI/CD or local environment.
- Share tasks across projects, but not config.
- Keep secrets secret.
- Extensible. You can customise deploy.php.
- Multiple projects/domains/stages per host.
- Defaults to 'staging' for deploys etc
- Assumes key-based SSH authentication is configured for each host.
- Deploys into
Include in your project:
composer require --dev burnbright/silverstripe-deployer
This will add required vendor packages, and in particular the bin to run deployer:
Copy the deploy.php template to your project root:
cp vendor/burnbright/silverstripe-deployer/templates/deploy.php deploy.php
deploy.php file to suit your project.
.silverstripe-deployer to your gitignore.
To avoid needing to type
vendor/bin/dep, update your PATH to search the local vendor/bin folder:
Then you only need to type
dep from the root of your project.
(Assumes you've added ./vendor/bin to your PATH, otherwise use
dep- will list available commands.
dep deploy- defaults to deploying to 'staging'.
dep deploy production- deploy to 'production'.
dep ssh- ssh into a host.