Dump Symfony2 assets to Amazon S3

后端 未结 3 504
栀梦
栀梦 2021-01-30 15:08

I\'d like to dump my assets to my s3 bucket in production, after deploying with capifony in Symfony 2. I\'ve found some solution, but don\'t really find out the best to use.

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 16:02

    I've also found this: https://github.com/symfony/symfony/pull/108, where I can tell AsseticBundle the bucket name, but I didn't found where to provide the key and secret for my aws account.

    This should work - just use the following form when specifying the S3 bucket URL:

    # config_prod.yml
    assetic:
        write_to: s3://{key}:{secret}@{bucket}/
    

提交回复
热议问题