Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Bongo S3Asset Installer Bundle Laravel Package

bongo/bongo-s3asset-installer-bundle

View on GitHub
Deep Wiki
Context7

#Symfony S3 Asset Installer

This bundle adds a console command to facilate the the asset synchronization between your local file system to amazon S3. The benefit of using this bundle is, it doesnt create ugly keys in s3 bucket. and lets you isolate your production and dev assets.

The installation is very simple. First install the package using composer.

Installation

Require the package in your composer.json:

composer require bongo/bongo-s3asset-installer-bundle

Then enable it in your Appkernel:

public function registerBundles()
{
    $bundles = [
        ....
        new Bongo\S3AssetInstallerBundle\BongoS3AssetInstallerBundle(),
    ]
}

Configuration

You must provided the following parameters:


amazon_s3_key: (your key)
amazon_s3_secret: (your secret)
amazon_s3_region:  (your region)
amazon_s3_bucket: (your bucket name without s3://)

Then your config.yml add the following configuration:

bongo_s3_asset_installer:
    amazon_s3_key: "%amazon_s3_key%"
    amazon_s3_secret: "%amazon_s3_secret%"
    amazon_s3_region: "%amazon_s3_region%"
    amazon_s3_bucket: "%amazon_s3_bucket%"

Add the assets_base_url in config_prod.yml

framework:    
    assets:
        base_urls:
            - 'http://cdn.production.com/'

Add the assets_base_url in your config_dev.yml

framework:    
    assets:
        base_urls:
            - 'http://local.localhost.com/'

Also, you need change the write_to parameter to your s3 bucket:

assetic:
    write_to: s3://my_bucket

Usage

Just use the normal assets commands but using s3 as the target:

First install the assets:

php app/console s3:assets:install s3://my-bucket/

or

php bin/console s3:assets:install s3://my-bucket/

after asset installation, dump the assetic

php app/console assetic:dump s3://my-bucket

or

php bin/console assetic:dump s3://my-bucket
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours