zach2825 / laravel-ftp-deployment
Fund package maintenance!
YOURLS
ozh
LeoColomb
dgw
Open Collective
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
Notes:
Installation
composer require zach2825/laravel-ftp-deployment php artisan vendor:publish --tag=ftp-deployment
Setup
Create a filesystem disk to deploy to in 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, ],
Adjust which files should be deployed and hooks in config/ftp-deployment.php
Deploy to server
php artisan deploy:server <servername> <--refresh=0> <--debug=1>
Use refresh to refresh the database migrations and run the seeders. If flag not set, only migration will be run.