kevinsimard / laravel-deploy by kevinsimard

Deploy Laravel application through SSH
13
1
2
Package Data
Maintainer Username: kevinsimard
Maintainer Contact: kev.simard@gmail.com (Kevin Simard)
Package Create Date: 2015-04-28
Package Last Update: 2017-03-23
Language: PHP
License: MIT
Last Refreshed: 2024-12-11 15:00:33
Package Statistics
Total Downloads: 13
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 1
Total Open Issues: 0

Deploy Laravel Application

Installation

Add Kevinsimard\Deploy\Command\Task\DeployTask to the list of commands in app/Console/Kernel.php.

<?php namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel {

    /**
     * @var array
     */
    protected $commands = [
        ...
        "Kevinsimard\Deploy\Command\Task\DeployTask",
    ];
...

Add/edit the config/remote.php file.

<?php

return [
    // default connection name
    "default" => "local",

    // connections
    "connections" => [
        "local" => [
            "host"      => "127.0.0.1",
            "username"  => "username",
            "password"  => "password",
            "key"       => "",
            "keytext"   => "",
            "keyphrase" => "",
            "agent"     => "",
        ],
    ],

    // connection groups
    "groups" => [
        "web" => ["local"]
    ],
];

Artisan Command

php artisan deploy:app <ROOT>

The following options are available:

  • --remote=<CONNECTION>: Remote connection/group name
  • --no-composer: Do not install dependencies
  • --no-migration: Do not run migration files
  • --no-maintenance: Do not use maintenance mode

Code Structure

├── src
│   └── Kevinsimard
│       └── Deploy
│           └── Command
│               └── Task
│                   └── DeployTask.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json

License

This package is open-sourced software licensed under the MIT license.