2017 © Pedro Peláez
 

library laravel-deployer

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

image

foodkit/laravel-deployer

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  • Thursday, September 7, 2017
  • by coreymcmahon
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1,001 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 23 Versions
  • 17 % Grown

The README.md

(Simple) Laravel Deployer

This is a Deployer recipe for Laravel deployments that cannot (or would prefer not to) rely on symlinks. Instead, Git is simply used to update the codebase directly on the server., (*1)

Installation

Install the package via composer:, (*2)

composer require foodkit/laravel-deployer

Configuration

Define the deploy.php file in your project's root:, (*3)

<?php

namespace Deployer;

require __DIR__.'/vendor/foodkit/laravel-deployer/src/laravel-norevision.php';

// Configuration
set('ssh_type', 'native');
set('ssh_multiplexing', true);
set('branch', 'production');
set('repository', 'git@github.com:company/project.git');

// Servers
server('production', '1.2.3.4')
    ->user('root')
    ->identityFile()
    ->set('deploy_path', '/var/www/project');

You may want to run the deployment as standalone (not part of a project). This will skip certain checks against the state of the local repository. In this case, use the standalone flag:, (*4)

set('standalone', true);

Also, the migration step can be disable if your project doesn't require it:, (*5)

set('migration', false);

Slack integration

If you'd like to integrate with Foodkit's release note generator, add the following:, (*6)


option('start', null, InputOption::VALUE_OPTIONAL, 'The start tag/branch'); option('end', null, InputOption::VALUE_OPTIONAL, 'The end tag/branch'); set('slack_title', 'Release notes'); set('slack_color', '#4d91f7'); set('slack_emoji', ':ghost:'); set('slack_name', 'Laravel Deployer'); set('slack_webhook', 'https://hooks.slack.com/services/ABCDEFGH/IJLMNOPQ/OJI7OA9IU1BAJgGj4ge3YD9A'); set('release_notes_command', 'vendor/bin/release-notes generate');

then run the deployment with the start and end command line parameters., (*7)

API integration

If you'd like to send the release note to an API endpoint, add the following:, (*8)


option('start', null, InputOption::VALUE_OPTIONAL, 'The start tag/branch'); option('end', null, InputOption::VALUE_OPTIONAL, 'The end tag/branch'); set('api_endpoint', 'https://api.product.com'); after('deploy', 'slack:send-release-notes-api');

then run the deployment with the start and end command line parameters., (*9)

How to deploy

Run the deploy command:, (*10)

php vendor/bin/dep deploy production

Optionally, a tag or a branch can be specified on the command line:, (*11)

php vendor/bin/dep deploy production --tag="v0.1"
php vendor/bin/dep deploy production --branch="develop"

Optionally, if you're integrating with the release note generator:, (*12)

php vendor/bin/dep deploy production --tag="v1.0.8" --start="v1.0.7" --end="v1.0.8"

To see what exactly happening you can increase verbosity of output with --verbose option:, (*13)

  • -v for normal output,
  • -vv for more verbose output,
  • -vvv for debug.

For semver

If you use semantic versioning, the repo has "hotfix" and "release" tasks built-in., (*14)

Hotfixes

php vendor/bin/dep hotfix production

This will take the latest tag, increment it by 0.0.1, create a new tag and deploy that., (*15)

Releases

php vendor/bin/dep release production

Same as for the hotfix command, but it will increment latest tag by 0.1, (*16)

Contributing

See the list of issues., (*17)

Submit a pull request against master., (*18)

The Versions

07/09 2017

dev-master

9999999-dev

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

07/09 2017

1.0.21

1.0.21.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

07/09 2017

1.0.20

1.0.20.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

07/09 2017

1.0.19

1.0.19.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.18

1.0.18.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.17

1.0.17.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.16

1.0.16.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.15

1.0.15.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.14

1.0.14.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.13

1.0.13.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.12

1.0.12.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

06/09 2017

1.0.11

1.0.11.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

30/08 2017

1.0.10

1.0.10.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

15/08 2017

1.0.9

1.0.9.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

09/08 2017

1.0.8

1.0.8.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

09/08 2017

1.0.7

1.0.7.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

09/08 2017

1.0.6

1.0.6.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

04/08 2017

1.0.5

1.0.5.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

04/08 2017

1.0.4

1.0.4.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

26/07 2017

1.0.3

1.0.3.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

25/07 2017

1.0.2

1.0.2.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

25/07 2017

1.0.1

1.0.1.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon

24/07 2017

1.0.0

1.0.0.0

A Deployer recipe for Laravel projects that doesn't use symlinked revisions.

  Sources   Download

MIT

The Requires

 

by Mohammad Emran Hasan
by Corey Mcmahon