craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.29k stars 638 forks source link

Cloud-based asset sources should support environmentVariables #836

Closed angrybrad closed 7 years ago

angrybrad commented 7 years ago

Created by: Brandon Kelly (brandon@pixelandtonic.com) on 2015/03/06 03:54:45 +0000 Votes at time of UserVoice import: 47


Currently it's only possible to set Asset Source settings on a per-environment basis for Local asset sources (using the environmentVariables config setting). It would be nice if the cloud-based sources (S3, Rackspace, Google) also supported environmentVariables.

angrybrad commented 7 years ago

Posted by Anonymous (dlusk@thehumaneleague.com) on 2016/11/15 01:35:27 +0000

Ditto Mr Drzycimski's comment!

angrybrad commented 7 years ago

Posted by Mark Drzycimski (mark@clickrain.com) on 2016/09/06 16:22:14 +0000

Signed up just to place my vote. Painful, this. ;-)

angrybrad commented 7 years ago

Posted by Anonymous (dpullen19@gmail.com) on 2016/09/05 19:29:29 +0000

Please can this be implemented!

angrybrad commented 7 years ago

Posted by Narration SD (narrationsd@gmail.com) on 2015/04/14 16:07:09 +0000

This one looks particularly useful after staring at Docker/Ansible entire-site configuration for the last week -- hope it can go in.

angrybrad commented 7 years ago

Posted by Jared (jared.meyering@gmail.com) on 2016/04/29 02:41:33 +0000

To me This is a must have feature. Storing AWS key's and secrets in a database is :thumbsdown:

angrybrad commented 7 years ago

Posted by Michael (michael@michaelrog.com) on 2015/03/11 15:06:07 +0000

FWIW, you can hack this functionality by sprinkling craft()->config->parseEnvironmentString() into AssetSourceRecord.php... Off the top of my head I think you have to add it in getBaseUrl(), getPathPrefix(), and getS3Path().

I, too, would love to see this enabled out-of-the-box.

angrybrad commented 7 years ago

Posted by Liam Scott (liamscott@greenhouse.io) on 2015/10/29 22:19:21 +0000

This would be amazing! I couldn't be more for this.

angrybrad commented 7 years ago

Posted by Zack Spear (zack@designbycosmic.com) on 2015/04/22 23:51:54 +0000

This would be huge.

We've run into issues using the same bucket across multiple environments and it causes a good amount of issues. It would be nice to not have to change the S3 bucket manually with DB imports and exports.

eriweb commented 7 years ago

This is a huge issue for us, we replicate database between environments but use different buckets.

andris-sevcenko commented 7 years ago

Already possible via https://github.com/craftcms/docs/blob/master/en/configuration.md#overriding-volume-settings and .env file.