-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow .env variables #7
Comments
Added environment variable support to the Project ID and Subfolder settings for the next release, but not Bucket yet. (Even our S3 plugin doesn’t let you set the Bucket setting to an environment variable yet.) |
You guys are amazing! |
Hi @brandonkelly. I am having an issue with env vars... we are doing some major re-structuring to our local site which will be deployed to staging. However, because we can't change the bucket locally to a test bucket, the changes we are making are causing loads of issues on production due to assets being transformed in the wrong locations based on the structure we've assigned locally. How would you suggest we handle this if we can't change the bucket in different env vars? Ideally we need a way to point our local env to a completely different bucket or volume. (removing the ID from the account didn't help as I believe access is provided via the access key file, which also isn't env defined) In future, i'm sure it would be fine to set up different subfolders using env vars, but as this is already a live project, the migration still seems to affect previous data that the live site still needed. |
@toddpadwick you can create config overrides in a <?php
return [
'volumeHandle' => [
'bucket' => getenv('TEST_BUCKET')
]
]; Using the Hope that helps! |
Thank you so much for this, @andris-sevcenko. @brandonkelly would you mind to either add @andris-sevcenko's hint this to the docs or accept a pull-request with a bit more config guidance? |
Support for overriding volume configs in config/volumes.php has been deprecated. |
Is there any update on this? The current solution also keeps writing the actual bucket name into project.config instead of the dynamic config. Any help is very appreciated. |
Can these fields be .env variables:
The text was updated successfully, but these errors were encountered: