wodby / redis Goto Github PK
View Code? Open in Web Editor NEWRedis docker container image
Home Page: https://wodby.com/stacks/redis
License: MIT License
Redis docker container image
Home Page: https://wodby.com/stacks/redis
License: MIT License
I followed the instructions here: http://docs.docker4wordpress.org/en/latest/containers/redis/, but wordpress cannot connect to the redis instance. I've tried on a fresh ubuntu installation and docker for windows. I am a docker newbie, so there may be some obvious setup that is implied that I have missed.
here is the docker-compose.yml:
version: "2"
services:
mariadb:
image: wodby/mariadb:10.1-2.1.0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
- ./mysql:/var/lib/mysql # I want to manage volumes manually.
php:
# image: wodby/wordpress:4-7.1-2.1.0
# image: wodby/wordpress:4-7.0-2.1.0
# image: wodby/wordpress-php:7.0-2.1.0
image: wodby/wordpress-php:7.1-2.1.0
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
# PHP_XDEBUG: 1
# PHP_XDEBUG_DEFAULT_ENABLE: 1
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 # This is needed to respect remote.host setting bellow
# PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
volumes:
- ./wordpress:/var/www/html
# - d4d-unison-sync:/var/www/html # Docker-sync for macOS users
nginx:
image: wodby/wordpress-nginx:4-1.10-2.1.0
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/
volumes:
- ./wordpress:/var/www/html
# - d4d-unison-sync:/var/www/html # Docker-sync for macOS users
depends_on:
- php
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:wp.docker.localhost'
varnish:
image: wodby/wordpress-varnish:4.1-2.1.0
depends_on:
- nginx
environment:
VARNISH_SECRET: secret
VARNISH_BACKEND_HOST: nginx
VARNISH_BACKEND_PORT: 80
labels:
- 'traefik.backend=varnish'
- 'traefik.port=6081'
- 'traefik.frontend.rule=Host:varnish.wp.docker.localhost'
redis:
image: wodby/redis:3.2-2.1.0
volumes:
- ./redis:/data
pma:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
PMA_USER: wordpress
PMA_PASSWORD: wordpress
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- 'traefik.backend=pma'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:pma.wp.docker.localhost'
mailhog:
image: mailhog/mailhog
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.wp.docker.localhost'
traefik:
image: traefik
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '8000:80'
- '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
I would like to install redis on my docker4drupal website,
but I can't get the configuration in documentation, I install the module redis for drupal, whas is the correct configuration ?
Thanks
I'm running this container using Docksal, and it's not working because I'm using an M1 MacBook Pro, which has an ARM processor, and this container is AMD64.
The error it throws is:
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
And then a big stack trace, which I can paste in here if that would be helpful.
The default redis
configuration conflicts with the expected behavior of REDIS_SAVE_TO_DISK
.
Currently when this container is run without setting REDIS_SAVE_TO_DISK redis will still try to dump it's content to the disk, causing slowdowns because of the default configuration:
Unless specified otherwise, by default Redis will save the DB:
- After 3600 seconds (an hour) if at least 1 change was performed
- After 300 seconds (5 minutes) if at least 100 changes were performed
- After 60 seconds if at least 10000 changes were performed
Source: https://raw.githubusercontent.com/redis/redis/7.0/redis.conf
As a user I want to run this redis container without dumping the db content to disk.
This should be archived using a command similar to the following:
docker run -d -p 6379 wodby/redis:7
Redis does not dump the data to disk, because REDIS_SAVE_TO_DISK
is not set.
The data is dumped to disk based on the default save
configuration.
I am running Redis in global mode for a swarm setup and have some performance issues.
I am looking at the logs and I have this going on as well, which may or not be related:
1:M 24 Apr 22:03:10.486 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.,
1:M 24 Apr 22:03:10.486 # Server started, Redis version 3.2.8,
1:M 24 Apr 22:03:10.486 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.,
1:M 24 Apr 22:03:10.486 * The server is now ready to accept connections on port 6379,
1:M 24 Apr 22:03:10.486 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.