ktc / cdn
Content server for Lavavel/Voyager KTC
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0.0
- illuminate/filesystem: ^5.0
- illuminate/support: ^5.0
- league/flysystem: ^1.0
- league/flysystem-sftp: ^1.0
- tcg/voyager: ^1.0
- dev-master
- 1.0.62
- 1.0.61
- 1.0.60
- 1.0.59
- 1.0.58
- 1.0.57
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.53
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.37
- 1.0.36
- 1.0.35
- v1.0.34
- v1.0.33
- v1.0.32
- v1.0.31
- v1.0.30
- v1.0.29
- v1.0.28
- v1.0.27
- v1.0.26
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.2
- v1.0.1
- v1.0.0
This package is not auto-updated.
Last update: 2025-03-30 07:13:54 UTC
README
Steps for installing the CDN for lavavel and voyager.
Envoy Task Runner
Complete documentation on the official website of Laravel
It runs on the console the following command of composer
composer global require laravel/envoy
Install the library
composer require ktc/cdn
Add the service provider
Edit the file /config/app.php
Adds a new value at the end of the array providers
'providers' => [ //.... //... //. CDN\CDNServiceProvider::class
Configure new driver
Edit the file /config/filesystems.php
Adds a new value at the end of the array disks
'disks' => [ //.... //... //. 'sftp' => [ 'driver' => 'sftp', 'host' => env('CDN_SSH_HOST'), 'port' => 22, 'username' => env('CDN_SSH_USERNAME'), 'password' => '', 'privateKey' => env('CDN_SSH_PRIVATE_KEY_PATH'), 'root' => env('CDN_BASE').'/'.env('CDN_BASE_SUBDIRECTORY'), ]
Create the new repository in the CDN Server
php artisan cdn:install
Follow the instructions
After generating the installation your project will contain the following keys:
.env
FILESYSTEM_DRIVER It defines the new driver to use (default is sftp).
CDN_BASE Actual absolute path where are stored across content repositories
CDN_BASE_SUBDIRECTORY ID only, create a directory for the project, do not use special characters or spaces.
CDN_SSH_USERNAME User's ssh connection that is used locally.
CDN_SSH_PRIVATE_KEY_PATH Key SSH connection, the path must be absolute to the computer.
CDN_SSH_HOST Connection to the CDN host
CDN_PUBLIC Access for the public to the CDN
Example
FILESYSTEM_DRIVER=sftp CDN_BASE=/example/path CDN_BASE_SUBDIRECTORY=exampleProject CDN_SSH_USERNAME=root CDN_SSH_PRIVATE_KEY_PATH=/Users/example/.ssh/id_rsa CDN_SSH_HOST=experience.ktcagency.com CDN_PUBLIC=cdn.experience.ktcagency.com
Ready.
If you are using Voyager
Edit the file /config/voyager.php
Changes the value of storage
'storage' => [ 'disk' => 'sftp', ],