Skip to content

An example of deploying laravel project through Deployer

License

Notifications You must be signed in to change notification settings

MilesPong/laravel-deployer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deployer Example for Laravel

An example to show how to deploy a laravel project through deployer.

Preview

asciicast

Requirements

  • deployer
  • laravel project

Also, don't forget to review the official deployer documentation at first.

Installation

Install deployer package through global installation of composer (recommended), so that you can access command dep everywhere, or you may use vendor/bin/dep instead.

$ composer global require deployer/deployer

Then clone the source:

$ git clone https://github.com/MilesPong/laravel-deployer
$ cd laravel-deployer
$ cp .env.example .env
$ cp hosts.yml.example hosts.yml
$ composer install

Modify slack_webhook in .env if you are going to use slack notification.

Modify the hosts configurations in hosts.yml, by default there are two example hosts, a remote host and a local host.

Usage

Once you have set up the configurations, run command as follow:

$ dep deploy <stage_or_host>

This will deploy the code to your specific host(s) indicated by argument stage_or_host, mainly flow including:

  • update code
  • recreate application's cache
  • build the static resources
  • send slack notifications

You can take a look the whole flow in main task section in deploy.php.

Or advanced usage:

$ dep deploy <stage_or_host> --branch=GIT_BRANCHE --npm-env=NPM-ENV
# e.g. dep deploy localhost --branch=develop --npm-env=prod

Contributing

Contributions are welcome through pull request and issue.

License

This project is released under MIT license.

About

An example of deploying laravel project through Deployer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages