burnbright/silverstripe-deployer

There is no license information available for the latest version (0.2.1) of this package.

Opinionated recipe for deploying SilverStripe projects via Deployer

0.2.1 2017-09-11 09:05 UTC

This package is auto-updated.

Last update: 2021-10-24 13:53:20 UTC


README

Opinionated recipe for deploying SilverStripe projects via Deployer.

https://deployer.org

Goals

  • 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.

Opinions

  • Defaults to 'staging' for deploys etc
  • Assumes key-based SSH authentication is configured for each host.
  • Deploys into ~/deploy/{hostname}. e.g.
    • ~/deploy/example.com
    • ~/deploy/test.example.com

Installation and setup

Include in your project: composer require --dev burnbright/silverstripe-deployer This will add required vendor packages, and in particular the bin to run deployer: vendor/bin/dep.

Copy the deploy.php template to your project root: cp vendor/burnbright/silverstripe-deployer/templates/deploy.php deploy.php

Modify your deploy.php file to suit your project.

Add .silverstripe-deployer to your gitignore.

Simplify vendor commands

To avoid needing to type vendor/bin/dep, update your PATH to search the local vendor/bin folder:

export PATH=$PATH:./vendor/bin

Then you only need to type dep from the root of your project.

Usage

(Assumes you've added ./vendor/bin to your PATH, otherwise use vendor/bin/dep)

  • dep - will list available commands.
  • dep deploy - defaults to deploying to 'staging'.
  • dep deploy production - deploy to 'production'.
  • dep ssh - ssh into a host.

Influences