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

Memcache #2112

Closed
XHyperDEVX opened this issue Dec 2, 2023 · 11 comments
Closed

Memcache #2112

XHyperDEVX opened this issue Dec 2, 2023 · 11 comments

Comments

@XHyperDEVX
Copy link

Hello, I have just installed Nextcloud in Docker and now it wants me to activate Memcache. I have no idea how to do this, I spent the last hours trying out some things and tutorials, but always failed to install any php modules because they were not available in the container...

that was already in my config.php:
'memcache.local' => '\\OC\\Memcache\\APCu',

Can someone explain to me step by step how to install memcache in docker? all the tutorials on the internet seem to be for standalone nextclouds only.

thanks a lot!

@AceDenghar
Copy link

Hello,

Here is what i added to my config.php :

  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '<DbHostName>',
    'password' => '',
    'port' => 6379,
  ),

Take care to set your own

@XHyperDEVX
Copy link
Author

@AceDenghar do i have to install anything specific for 'host' => '<DbHostName>',? dbhostname, should i create a second mariadb/mysql/postgre db for it?

@AceDenghar
Copy link

Oups !!

This is not the db hostname !

But the name of redis container. Sorry.

in my docker-compose.yml i use to name containers.

container_name: .......

So this is what you have to set

@XHyperDEVX
Copy link
Author

@AceDenghar Thank you! I have now also installed redis as a single container, changed your code accordingly and it works! Now just one more thing: Can I install the redis server IN the nextcloud container so that both are in one container?

@AceDenghar
Copy link

Hey ! Good news !

About 'install' redis server 'in' the Nextcloud container,I think you should make your own image to achieve that.

I use multiple containers (Nextcloud, MariaDb and Redis) in the same docker-compose.yml file.

You can consult mine in this tipic (still need help... 😥) to have an example.

Ps : sorry for my English.

Ace

@XHyperDEVX
Copy link
Author

@AceDenghar Okay thanks, I'll have a look.

Another question, I just wanted to set up the cronjob for Nextcloud, then I realized that in the nextcloud docker image cronjob is not in it at all????

crontab: command not found

Why not?

@AceDenghar
Copy link

Personally, I use Cron of the host to run this command :

docker exec -u www-data <myNextcloudContainer> php -f /var/www/html/cron.php

@XHyperDEVX
Copy link
Author

right. that should work. but why isn't cronjob simply in the image?

@XHyperDEVX
Copy link
Author

@AceDenghar And how can I fix this?
The current PHP memory limit is below the recommended value of 512MB.
PHP is not where it would be in the standalone installation, in /etc/php...

@AceDenghar
Copy link

You are now talking about many configuration subjects on this threads wich should be dedicated to memcache and should be closed because it's solved.

For your last question have a look on the description of this project, PHP limit and other details of the configuration are mentionned.

@XHyperDEVX
Copy link
Author

Thanks and sorry!

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

No branches or pull requests

2 participants