-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overriding volume settings is very cumbersome #3219
Comments
Yep. I think we should add a way to access environment variables in these settings (in addition to aliases where those still make sense). For example, Symfony sets doctrine:
dbal:
url: '%env(DATABASE_URL)%'
# ... |
Think it should be |
That'd be great! |
I like the idea of using an env value. Another UI solution would be a 'Save as a new volume' dropdown option like there is for entries, etc. |
This is implemented for Craft 3.1! (237d696) Ended up just going with Currently supported by:
|
@brandonkelly – So, for this to be useful for non-core Volume types (e.g. AWS S3) – would this have to be supported specifically supported by each Volume type, or could/should this be dynamically applied to all volume settings? I'd love to get away from having configs like this, but I don't see any other way:
|
We’ll need to update the S3 plugin to add support for it. |
👍 Made an issue: craftcms/aws-s3#35 |
If you're configuring AWS or something with API secrets and you want it kept out of the DB (as it is stored unencypted), overriding volume settings is your only option.
However, it is very cumbersome to do so.
Example:
test
Amazon S3 volume, putting your creds in the CP because that's the only way you can save the volume.test
creds inconfig/volume.php
, getting them from env, or wherever.volumes.settings
. However, if that volume ever gets saved again, they're back in the DB :(Solutions?
This is something that in Craft 2, this might have been been solved with "environment variables". You could do everything in the CP, but reference the variables instead. Aliases work for this for path-based things, but their application seemed to be limited to paths/urls…
If creating Volumes in the CP is a requirement, it seems like there should be a manageable way to reference dynamic values for this purpose.
These examples are specifically for volumes, but the same is true for other components with credentials (e.g. email).
The text was updated successfully, but these errors were encountered: