its-mieger / cdn
CDN publication for PHP projects
dev-master
2021-11-22 15:09 UTC
Requires
- aws/aws-sdk-php: ~3.14
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2025-03-24 01:32:13 UTC
README
Content-Delivery-Network module to publish files to an external CDN and access URLs easily.
Include CDN to application
Simply include the generated cdn.php
require_once('vendor/cdn.php');
Sync files to CDN
Call cdn-push script:
cdn-push [path to cdn.json]
cdn.json
Example:
{
"root-dir": "webroot",
"default-config": {
"adapter": "S3",
"aws": {
"region": "eu-west-1",
"credentials": {
"key": "",
"secret": ""
}
},
"bucket": "test-bucket",
"url": "test.test.de"
},
"paths": {
"img": true,
"css": {
"append-hash": true
}
}
}