AsseticAmazonS3Bundle
, (*1)
Bundle to dump assetic assets to Amazon S3, (*2)
Installation
Require the package in your composer.json:, (*3)
composer require albertofem/assetic-amazon-s3-bundle dev-master
Enable it in your Appkernel:, (*4)
public function registerBundles()
{
$bundles = [
....
new \AFM\Bundle\AsseticAmazonS3Bundle\AFMAsseticAmazonS3Bundle(),
]
}
Configuration
You must provided the following parameters:, (*5)
aws_key: ~
aws_secret_key: ~
aws_region: ~
Also, you need change the write_to
parameter to your s3 bucket:, (*6)
assetic:
write_to: s3://my_bucket
Usage
Just use the normal assets commands but using s3 as the target:, (*7)
php app/console assetic:dump
php app/console assets:install s3://my-bucket