bongo/bongo-s3asset-installer-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bongo/bongo-s3asset-installer-bundle

Composer 安装命令:

composer require bongo/bongo-s3asset-installer-bundle

包简介

This bundle will upload your symfony web apps assets to amazon s3 easily

README 文档

README

#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

bongo/bongo-s3asset-installer-bundle 适用场景与选型建议

bongo/bongo-s3asset-installer-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 bongo/bongo-s3asset-installer-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bongo/bongo-s3asset-installer-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 bongo/bongo-s3asset-installer-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-17