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

Redis password AUTH issue in docker-compose example #1608

Closed
laenan8466 opened this issue Oct 13, 2021 · 8 comments
Closed

Redis password AUTH issue in docker-compose example #1608

laenan8466 opened this issue Oct 13, 2021 · 8 comments
Labels
bug examples Compose/Dockerfile/etc feature: auto config (environment variables) Auto configuring via environment variables integration: memcache Integration with any Nextcloud supported Memcached (Redis, Memcached, etc)

Comments

@laenan8466
Copy link

We need to update this example (docker-compose/with-nginx/mariadb/fpm), to handle the redis-db password issue (#1179).

Other docker-compose examples could be affected as well.

I fixed the problem by:

  1. Adding a redis.env file with:
    REDIS_HOST_PASSWORD=mypassword
  2. Modifiying the docker-compose.yml file in the following sections:
  app:
    image: nextcloud:fpm-alpine
    restart: always
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST=redis
    env_file:
      - redis.env
      - db.env
    depends_on:
      - db
      - redis
  redis:
    image: redis:alpine
    restart: always
    command: /bin/sh -c "redis-server --requirepass $$REDIS_HOST_PASSWORD"
    env_file:
      - redis.env

I have not the time atm to submit a PR, but wanted to have this documented.

@oschrich
Copy link

oschrich commented Dec 7, 2021

Thank you for documenting this -- I was able to fix up my install with this info.

@angelosnm
Copy link

Works like a charm! Thank you!

@BenRoe
Copy link

BenRoe commented Oct 3, 2022

Tested and it works.

@J0WI J0WI added the examples Compose/Dockerfile/etc label Apr 4, 2023
@feefladder
Copy link

How about we use a secrets file for the redis password?

@feefladder
Copy link

Also Take!

@feefladder
Copy link

But not sure if proper way is to check if password is empty or add files and everything

feefladder added a commit to feefladder/docker that referenced this issue Jun 12, 2023
feefladder added a commit to feefladder/docker that referenced this issue Jun 12, 2023
@padajuan
Copy link

worked, excellent!

@joshtrichards joshtrichards added bug integration: memcache Integration with any Nextcloud supported Memcached (Redis, Memcached, etc) feature: auto config (environment variables) Auto configuring via environment variables labels Oct 24, 2023
@joshtrichards
Copy link
Member

This should be no longer necessary since #1232 was merged. However, it's possible that pre-existing deployments may need to manually update their config/redis.config.php due ot #1533.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug examples Compose/Dockerfile/etc feature: auto config (environment variables) Auto configuring via environment variables integration: memcache Integration with any Nextcloud supported Memcached (Redis, Memcached, etc)
Projects
None yet
Development

No branches or pull requests

8 participants