Brought to you by Blacklight.
Deployment role for Laravel 5 apps. Deployment can be done via Git, SVN, Mercurial, and Rsync. Tries to imitate a similar structure to what you would see with other deployment tools such as Capistrano. The final directory structure will look something like this:
project
releases
// All releases will be going here
shared
storage
logs
framework
sessions
public
uploads
current // This will be a symlink to the latest release
The role also has error checking in place. If any of the steps fail the role will delete the newly created release folder and stop execution. If the deploy was successful the role will remove old releases.
Symfony: symfony-deploy
Laravel4: laravel4-deploy
The only requirement is Ansbile >= 1.2.
ansible-galaxy install blacklight.laravel4-deploy
The root directory of the project.
The URL to the repo containing the application code.
The branch that you would like to deploy.
The deployment strategy to use. Available options: git, svb, mercurial, rsync
This option is only used when deploying via Rsync. It defines the path to the local folder to upload to the server.
Important Note! The path is relative to your playbook file.
The path to an existing composer installation. If set to false, the role will automatically download composer into the projects root directory.
Flags to add to the composer install command.
The path to PHP. This is only used when the role has to download composer.
The amount of releases to keep in the releases directory.
---
- hosts: web
vars:
laravel_root_dir: /var/www/example
laravel_repo: git@github.com/example/example-project.git
laravel_composer_options: '--no-dev --optimize-autoloader --no-interaction'
ansible_ssh_user: root
roles:
- blacklight.laravel5-deploy
MIT