ebess/laravel-ftp-deployment

此包的最新版本(0.0.1)没有可用的许可证信息。

0.0.1 2015-11-03 19:11 UTC

This package is auto-updated.

Last update: 2024-08-29 04:09:05 UTC


README

安装

composer require ebess/laravel-ftp-deployment
php artisan vendor:publish

设置

config/filesystem.php 中创建一个文件系统磁盘以部署

    'disks' => [
      // ...
      'deployment' => [
        'driver'    => 'ftp',
        'host'      => 'ftp.server.org',
        'port'      => 21,
        'username'  => 'ftp-user',
        'password'  => 'ftp-password',
        'passive'   => true,
        'root'      => '/'
      ],
      // ...
    ]

config/ftp-deployment.php 中调整要部署的文件和钩子

部署到服务器

php artisan deploy:server <servername> <--refresh=0> <--debug=1>

使用刷新来刷新数据库迁移并运行种子。如果没有设置标志,则只运行迁移。