The easiest way is to use Composer:
{
"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.
See example.php for a simple setup.
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:
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)
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.
There are several stub methods in place to allow you to easily hook custom code into some steps of the deployment process.
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.
For automating database updates, have a look at LemonWeb/dbpatcher).
How can I help you explore Laravel packages today?