zach2825 / laravel-ftp-deployment
0.0.7
2021-06-05 16:21 UTC
Requires
- php: >=7.4
- illuminate/console: ^7.0|^8.0
- illuminate/http: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
- laravel/framework: ^v7.0.0|^v8.0.0
- league/flysystem-sftp: ^2.0.0
Requires (Dev)
- roave/security-advisories: dev-latest
README
备注
安装
composer require zach2825/laravel-ftp-deployment php artisan vendor:publish --tag=ftp-deployment
设置
在 config/filesystem.php 中创建一个用于部署的文件系统磁盘
'example' => [ 'driver' => 'ftp', 'host' => env('DEV_FTP_HOST'), 'username' => env('DEV_FTP_USER'), 'password' => env('DEV_FTP_PASS'), // Optional FTP Settings // 'port' => 21, // 'root' => env('DEV_FTP_ROOT', '/var/www/html/example'), // 'passive' => true, // 'ssl' => true, // 'timeout' => 30, ],
在 config/ftp-deployment.php 中调整应该部署哪些文件和钩子
部署到服务器
php artisan deploy:server <servername> <--refresh=0> <--debug=1>
使用刷新来刷新数据库迁移并运行种子文件。如果未设置标志,则只运行迁移。