Giter VIP home page Giter VIP logo

ansible-laravel5-deploy's Introduction

Laravel5 Deploy

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.

Other Deployment Roles

Symfony: symfony-deploy

Laravel4: laravel4-deploy

Requirements

The only requirement is Ansbile >= 1.2.

Installation

ansible-galaxy install blacklight.laravel4-deploy

Role Variables

laravel_root_dir (Required)

The root directory of the project.

laravel_repo (Required)

The URL to the repo containing the application code.

laravel_branch (Defaults: master)

The branch that you would like to deploy.

laravel_strategy (Defaults: git)

The deployment strategy to use. Available options: git, svb, mercurial, rsync

laravel_local_root (Defaults: /)

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.

laravel_composer_path (Defaults: false)

The path to an existing composer installation. If set to false, the role will automatically download composer into the projects root directory.

laravel_composer_options (Defaults: --no-dev --no-interaction --optimize-autoloader)

Flags to add to the composer install command.

laravel_php_path (Defaults: /usr/bin/php)

The path to PHP. This is only used when the role has to download composer.

laravel_releases (Defaults: 5)

The amount of releases to keep in the releases directory.

Example Playbook

---
- hosts: web
  vars:
    laravel_root_dir: /var/www/example
    laravel_repo: [email protected]/example/example-project.git
    laravel_composer_options: '--no-dev --optimize-autoloader --no-interaction'
    ansible_ssh_user: root

  roles:
    - blacklight.laravel5-deploy

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.