kevinsimard/laravel-deploy

通过 SSH 部署 Laravel 应用程序

v1.0.4 2016-09-22 14:17 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:16:33 UTC


README

安装

Kevinsimard\Deploy\Command\Task\DeployTask 添加到 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",
    ];
...

添加/编辑 config/remote.php 文件。

<?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 命令

php artisan deploy:app <ROOT>

以下选项可用

  • --remote=<CONNECTION>: 远程连接/组名称
  • --no-composer: 不安装依赖项
  • --no-migration: 不运行迁移文件
  • --no-maintenance: 不使用维护模式

代码结构

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

许可证

此软件包是开源软件,受MIT许可证许可。