Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekyna/digitaloceanbundle
Deploy assets to digital ocean space CDN
https://github.com/ekyna/digitaloceanbundle
Last synced: 9 days ago
JSON representation
Deploy assets to digital ocean space CDN
- Host: GitHub
- URL: https://github.com/ekyna/digitaloceanbundle
- Owner: ekyna
- License: mit
- Created: 2020-11-18T09:26:53.000Z (almost 4 years ago)
- Default Branch: 0.7
- Last Pushed: 2022-07-04T08:42:11.000Z (over 2 years ago)
- Last Synced: 2024-04-13T16:34:49.666Z (7 months ago)
- Language: PHP
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ekyna/digital-ocean-bundle
==========Deploy assets to Digital Ocean space CDN
### Installation
Install using composer:
```bash
composer require ekyna/digital-ocean-bundle
```Register the bundle:
```php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
// ...
new Ekyna\Bundle\DigitalOceanBundle\EkynaDigitalOceanBundle(),
];
}
}
```Add the configuration:
```yaml
ekyna_digital_ocean:
api:
token: YOUR_API_TOKEN
spaces:
-
name: my-do-cdn # Must match space name on Digital Ocean
region: ams3
key: SPACE_ACCESS_KEY
secret: SPACE_ACCESS_SECRET
usage:
bundles: my-do-cdn # The space to use for assets deployment
```### Usage
Spaces storages are available as [League\Flysystem\Filesystem](https://github.com/thephpleague/flysystem/blob/1.x/src/Filesystem.php) (v1) services :
```xml
ekyna_digital_ocean.my_do_cdn.filesystem
```
### Commands
You can deploy bundles assets to your space CDN by running the following command:
```php bin/console ekyna:digital-ocean:assets:deploy```
_Warning: it purge the entire CDN cache._