docker4drupal icon indicating copy to clipboard operation
docker4drupal copied to clipboard

Redis for D7 doesn't work

Open VladSavitsky opened this issue 3 years ago • 0 comments

OS type Linux

Drupal version 7

Codebase Mounted codebase

Describe the bug Steps to repoduce:

  1. Installed verison 7.x-3.18 of 'redis' module.
  2. Default docker-compose.yml
  3. Custom docker-compose.override.yml
  4. Added to settings.php code from https://github.com/wodby/docker4drupal/blob/master/tests/7/test.settings.php
$contrib_path = is_dir('sites/all/modules/contrib')
  ? 'sites/all/modules/contrib'
  : 'sites/all/modules';

if (file_exists($contrib_path . '/redis')) {
  $conf['redis_client_base'] = 0;
  $conf['redis_client_interface'] = 'PhpRedis';
  $conf['lock_inc'] = $contrib_path . '/redis/redis.lock.inc';
  $conf['path_inc'] = $contrib_path . '/redis/redis.path.inc';
  $conf['cache_backends'][] = $contrib_path . '/redis/redis.autoload.inc';
  $conf['cache_default_class'] = 'Redis_Cache';
  $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';

  $conf['redis_client_host'] = 'redis';
  $conf['redis_client_port'] = '6379';
  $conf['redis_client_password'] = 'bad-password';
}
  1. Refresh page leads to endless loading which ends by timeout.

Notes: When login to redis container, ran 'redis-cli' and then 'keys *' then it shows that some cache data already stored.

Output of docker info

Client:
 Debug Mode: false

Server:
 Containers: 9
  Running: 9
  Paused: 0
  Stopped: 0
 Images: 11
 Server Version: 19.03.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.0-66-generic
 Operating System: Ubuntu 20.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 9.621GiB
 Name: vlad-UX32VD
 ID: 7FAH:HJHC:KMQW:KOHB:CGL3:UBWP:MGV4:IZ4K:BVDC:UT73:ER34:PK4E
 Docker Root Dir: /home/vlad/.docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Contents of your docker-compose.yml

Default file provided by Docker4Drupal
version: "3"

services:
  mariadb:
    environment:
      MYSQL_DATABASE: dev_domain_com
    tmpfs:
      - /tmp/:rw,noexec,nosuid,size=50m
  php:
    environment:
      DB_NAME: dev_domain_com
    volumes:
      # Webroot.
      - ~/path/to/project:/var/www/html
  nginx:
    environment:
      NGINX_SERVER_EXTRA_CONF_FILEPATH: /var/www/nginx_locations/locations.conf
      NGINX_SERVER_ROOT: /var/www/html/public_html
    labels:
      - "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`dev.domain.com`)"
    volumes:
      - ~/path/to/project:/var/www/html
  adminer:
    container_name: "${PROJECT_NAME}_adminer"
    image: wodby/adminer:$ADMINER_TAG
    environment:
      ADMINER_DEFAULT_DB_HOST: $DB_HOST
      ADMINER_DEFAULT_DB_NAME: $DB_NAME
    labels:
      - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)"
  traefik:
    ports:
    - '80:80'
  redis:
    container_name: "${PROJECT_NAME}_redis"
    image: wodby/redis:$REDIS_TAG
    command: redis-server --requirepass bad-password
    ports:
      - '6379:6379'

Contents of your .env

PROJECT_NAME=ngl
PROJECT_BASE_URL=ngl

DB_NAME=docker
DB_USER=docker
DB_PASSWORD=docker
DB_ROOT_PASSWORD=password
DB_HOST=mariadb
DB_PORT=3306
DB_DRIVER=mysql
MARIADB_TAG=10.5-3.10.1
DRUPAL_TAG=8-4.26.1
PHP_TAG=7.2-dev-4.22.0
NGINX_TAG=1.19-5.11.1
NGINX_VHOST_PRESET=drupal9
SOLR_CONFIG_SET="search_api_solr_4.1.6"
SOLR_TAG=8-4.8.0
ELASTICSEARCH_TAG=7-5.8.2
KIBANA_TAG=7-5.8.2
REDIS_TAG=6-3.4.9
NODE_TAG=14-dev-0.51.5
VARNISH_TAG=6.0-4.5.1
POSTGRES_TAG=13-1.19.0

ADMINER_TAG=4-3.14.0
APACHE_TAG=2.4-4.3.5
ATHENAPDF_TAG=2.16.0
DRUPAL_NODE_TAG=1.0-2.0.0
MEMCACHED_TAG=1-2.6.6
OPENSMTPD_TAG=6.0-1.8.1
RSYSLOG_TAG=latest
SELENIUM_CHROME_TAG=3.141
WEBGRIND_TAG=1-1.21.0
XHPROF_TAG=2.7.0

VladSavitsky avatar Mar 02 '21 22:03 VladSavitsky