Skip to content
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 variable for Bucket as volumes.php is deprecated #21

Closed
maxstrebel opened this issue Feb 1, 2021 · 1 comment
Closed

Allow .env variable for Bucket as volumes.php is deprecated #21

maxstrebel opened this issue Feb 1, 2021 · 1 comment

Comments

@maxstrebel
Copy link

Description

If you use different buckets for Dev, Staging and Production it is impossible to set the volumes reliably by .env variables. With the volumes.php deprecated, we need some way to set it. A side effect is, that these fields keep being overridden with a bucket name in the project config.

handle: ..
hasUrls: true
name: ...
settings:
  bucket: '' → can't be set reliably
  bucketSelectionMode: → can't be set reliably
  expires: ''
  keyFileContents: ''
  projectId: $GOOGLE_BUCKET_PROJECT_ID
  subfolder: $GOOGLE_BUCKET_IMAGES_FOLDER
sortOrder: 1
type: craft\googlecloud\Volume
url: $GOOGLE_BUCKET_BASE_URL → is sometimes overridden by the system

Solution

I'd be super happy if I could set bucket and url per environment. If there's another way besides the deprecated volumes.php, I'd be glad to know it.

@andris-sevcenko
Copy link
Contributor

Just released the 1.4.1 version of this plugin that allows setting the bucket selection to manual mode, which, in turn, allows ENV variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants