2017 © Pedro Peláez
 

library deployer

A website deployment tool

image

bugbyte/deployer

A website deployment tool

  • Sunday, July 5, 2015
  • by bjdelange
  • Repository
  • 1 Watchers
  • 4 Stars
  • 341 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

Installation

The easiest way is to use Composer:, (*1)

{
    "require": {
        "bugbyte/deployer": "1.0.*"
    }
}

If you can't or don't want to use Composer (oh come on..) you can just download from GitHub, but you'll have to take care of loading the files by yourself., (*2)

Usage

See example.php for a simple setup., (*3)

Requirements

  • Linux or FreeBSD (on both the local and the remote server)
  • SSH & RSync access to the remote server, preferably with public key auth (or you'll be typing your password a lot).
  • PHP CLI 5.2+ (on both the local and remote servers)

Workings

First, rsync is used to upload files to the remote server. Aside from supplying your own exclude files, data_dirs are excluded automatically.
If previous deployments are found the latest is used as --copy-dest to speed up rsync, and the new deployment is uploaded next to it in a new directory. At first deploy any directories with User Generated Content (data_dirs) are moved outside of the project root:, (*4)

by running "mv" in the remote shell
by running "ln -s" symlinks are created in their place (you may need to activate Apache's FollowSymlinks option), (*5)

Target specific files are renamed ("mv again") after everything is uploaded. These moved files will appear as changed/missing files in subsequent deploys.
After all file-stuff is done, a symlink called "production" is created, pointing to the deployment directory. This is your DocumentRoot., (*6)

There are several stub methods in place to allow you to easily hook custom code into some steps of the deployment process. - preDeploy - preActivate - postDeploy - preRollback - postDeactivate - postRollback - clearRemoteCaches, (*7)

In case of trouble, you can rollback to the previous deploy in only a few seconds.
The "production"-symlink is changed back and the new deployment is deleted., (*8)

For automating database updates, have a look at LemonWeb/dbpatcher)., (*9)

Todo

  • consistent coding style
  • finish translating everything from Dutch to English
  • clean up the output during deployment a bit more

The Versions

05/07 2015

dev-process

dev-process

A website deployment tool

  Sources   Download

MIT

The Requires

 

by Bert-Jan de Lange

29/06 2015

2.x-dev

2.9999999.9999999.9999999-dev

A website deployment tool

  Sources   Download

MIT

The Requires

 

by Bert-Jan de Lange

21/04 2015

dev-master

9999999-dev

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

09/11 2013

1.0.10

1.0.10.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

26/04 2013

1.0.9

1.0.9.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

07/03 2013

1.0.8

1.0.8.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

06/02 2013

1.0.7

1.0.7.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

14/12 2012

1.0.6

1.0.6.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

29/11 2012

1.0.5

1.0.5.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

26/11 2012

1.0.4

1.0.4.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

04/11 2012

1.0.3

1.0.3.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

01/10 2012

1.0.2

1.0.2.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

25/09 2012

1.0.1

1.0.1.0

A website deployment tool

  Sources   Download

MIT

by Bert-Jan de Lange

21/09 2012

1.0.0

1.0.0.0

  Sources   Download

by Bert-Jan de Lange