Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am trying to make this work for laravel 8. I'm bumping up required versions. #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Zach Robichaud

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
# Laravel 5 - FTP Deployment with WebHook
# Laravel 8 - FTP Deployment with WebHook

### Notes:

* https://laravel.com/docs/8.x/filesystem#ftp-driver-configuration

### Installation

```bash
composer require ebess/laravel-ftp-deployment
php artisan vendor:publish
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**

```php
'disks' => [
// ...
'deployment' => [
'driver' => 'ftp',
'host' => 'ftp.server.org',
'port' => 21,
'username' => 'ftp-user',
'password' => 'ftp-password',
'passive' => true,
'root' => '/'
],
// ...
]
'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

```bash
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.
26 changes: 22 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "ebess/laravel-ftp-deployment",
"name": "zach2825/laravel-ftp-deployment",
"license": "MIT",
"authors": [
{
"name": "Eduard Bess",
"email": "[email protected]"
},
{
"name": "Zach Robichaud",
"email": "[email protected]"
}
],
"autoload": {
Expand All @@ -12,8 +17,21 @@
}
},
"require": {
"illuminate/console": "5.*",
"illuminate/support": "5.*",
"guzzlehttp/guzzle": "5.*"
"php": ">=7.4",
"laravel/framework": "^v7.0.0|^v8.0.0",
"illuminate/console": "^7.0|^8.0",
"illuminate/support": "^7.0|^8.0",
"illuminate/http": "^7.0|^8.0",
"league/flysystem-sftp": "^2.0.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
},
"extra": {
"laravel": {
"providers": [
"Ebess\\FtpDeploymentServiceProvider"
]
}
}
}
Loading