-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adds ability to configure S3 object stores via environment variables #1193
Conversation
805634a
to
71fb7c3
Compare
@pierreozoux, would you be able to take a look at this? Most of the content is from that previous commit you mentioned in #1135. |
Nextcloud with S3 has some serious issues: |
The fact that encryption isn't working when Nextcloud's primary storage is a S3 object store is definitely an issue, but I don't see why that should mean that we shouldn't support this feature through the docker image. |
Looks good to me and I agree with @adamjenkins1 Encryption is still beta. |
@J0WI what do we need to merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid requiring HOST, the if block needs changed.
Another thought is should each entry getting added to the array independently? This could break if keys are added to the config array and empty string triggers unintended logic.
I'm thinking about my recent PR (nextcloud/server#20891), we'd want to leave out key and secret in this case to pick up the IAM role correctly in version 20+.
@cuppett the ideal would be the php code to read env var. Do you want to care of that upstream in the serveur code? I Think it is the best place. |
I've done testing with various versions of this file. I was able to emulate the default behaviors of the param file wrt set/unset environment variables and trues/falses here: https://github.com/cuppett/nextcloud-openshift-s2i/blob/master/autoconfig/objectstorage.config.php A container with this available is here: quay.io/cuppett/nextcloud:latest (uses Apache, Nextcloud 19 and /var/www/html as the storage location) Can we catch the PR code and doc stanza up to this? |
@cuppett I think you are the most knowlegble about this, feel free to update things :) Or if you prefer create a new PR if it is faster, I'll just trust you and merge it :) |
I've opened a PR for @adamjenkins1 (https://github.com/adamjenkins1/docker/pull/1/commits). If he merges it pulls in a rebase & has all these updates. Should then show here, we can merge and closes the issues! |
2b370b5
to
ce1b0c2
Compare
@pierreozoux We have it here now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have caught up to master with rebase and the cleanups.
Hum.. actually there are now 2 files objectstore and s3. As you want, if you don't mind, I'll redo the PR and put your names there. I'll take the objectstore file then. |
Yeah I just realized that. I can fix it. |
Signed-off-by: Adam Jenkins <adamjenkins1701@gmail.com> Rebase and update S3 config (#1) * Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de> * Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de> * Run update.sh Signed-off-by: tilosp-bot <git-bot@tilosp.de> * Adds ability to configure S3 object stores via environment variables Signed-off-by: Adam Jenkins <adamjenkins1701@gmail.com> * Updates objectstore autoconfiguration to match server defaults - usepath defaults to false (and is deprecated by AWS) - autocreate is not used/necessary by the objectstorage code (always tries to create) Signed-off-by: Stephen Cuppett <scuppett@redhat.com> * Dropping NULL check Co-authored-by: tilosp-bot <git-bot@tilosp.de> Co-authored-by: Tilo Spannagel <development@tilosp.de> Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com> Signed-off-by: Adam Jenkins <adamjenkins1701@gmail.com>
ce1b0c2
to
56376ed
Compare
Is there anything else that needs to be done before we can merge this? |
…1193 Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com> Co-authored-by: Stephen Cuppett <scuppett@redhat.com>
@adamjenkins1 sorry, it is just there was too many files in your commit, difficult to review, and not in sync with master. I created a new PR with the code, and merged it. Thanks @adamjenkins1 and @cuppett for your help on getting this done :) i put you as coauthor, I hope that's fine :) |
…1227) * Adds ability to configure S3 object stores via environment variables closes #1193 #1124 #1134 Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com> Co-authored-by: Stephen Cuppett <scuppett@redhat.com> * Update .config/s3.config.php Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com> Co-authored-by: Stephen Cuppett <scuppett@redhat.com>
Allows consumers of the Nextcloud docker image to configure S3 compatible object storage as Nextcloud's primary storage through environment variables. Supporting the configuration of this feature through the environment will make the image that much easier to leverage. Ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3