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

Set dbindex to separate data in a single Redis instance by environment variable #1286

Closed
wants to merge 2 commits into from

Conversation

f466162
Copy link

@f466162 f466162 commented Oct 25, 2020

Hi,

I want to share a single Redis instance and use it with several independent applications. Thus, I need a way to specify the dbindex. As I'm using a Docker deployment, I'd like to add the dbindex using an environment variable. For my Nextcloud 19 (i.e. "production") installation, I tested the following way. As I cannot test for different Nextcloud versions, I made this change only in the Nextcloud 19 folder. Perhaps the if-statement can be reused for different Nextcloud versions and can be copy/pasted.

Regards
Fabian

Fabian added 2 commits October 25, 2020 12:12
Let the user to choose a dbindex for his Redis connection to separate data in his Redis instance
@stefan04
Copy link

Hello,
I have the same requirement.
But setting the dbindex in the nextcloud config is not enough by itself. You also need to update the dbindex in the entrypoint.sh for the /usr/local/etc/php/conf.d/redis-session.ini file.

Thanks a lot!

Regards
Stefan

@felix-exon
Copy link

felix-exon commented Sep 8, 2022

This seems very helpful! Can this be merged or finalized?
🙏🏼 🙏🏼 🙏🏼

@efectn
Copy link

efectn commented Jan 8, 2023

Any updates? I think this would be pretty useful :/

@J0WI
Copy link
Contributor

J0WI commented Apr 4, 2023

In what case is this useful? The recommend deployment is to use a dedicated Redis container for each independent application.

@nderambure
Copy link

It seems a better approach to this is to have many Redis instances.
Correct me if I'm wrong, but Redis in mono-threaded so having many databases in same instance will create a bottleneck in performances.
You can easily create many instances on different ports :
https://medium.com/@starikovs/run-multiple-redis-instances-on-a-linux-server-systemd-approach-a7d1c75482bd
and then set correct config on each nextcloud instance.

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

Successfully merging this pull request may close these issues.

6 participants