feat(redis): allow configuring bind ip and unix socket

This commit is contained in:
Johanna Dorothea Reichmann 2021-10-19 12:14:28 +02:00
parent ab33387933
commit 6f639e34dc
No known key found for this signature in database
GPG key ID: 03624C433676E465
2 changed files with 8 additions and 1 deletions

View file

@ -8,6 +8,9 @@ redis_config_dir: "{{ redis_basepath }}/{{redis_prefix }}config"
redis_config_file: "{{ redis_config_dir }}/redis.conf"
redis_secret: ~
redis_config_bind_ip: "0.0.0.0"
redis_config_unix_socket_path: ~
redis_config_unix_socket_perm: 775
# Overwrite per-instance to be able to run many instances on the same host
# prefix should be sth like 'matrix_', modifies mapped directories, container name and uer
redis_prefix: ""

View file

@ -66,7 +66,7 @@
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 0.0.0.0
bind {{ redis_config_bind_ip }}
# Protected mode is a layer of security protection, in order to avoid that
# Redis instances left open on the internet are accessed and exploited.
@ -108,6 +108,10 @@ tcp-backlog 511
#
# unixsocket /tmp/redis.sock
# unixsocketperm 700
{% if redis_config_unix_socket_path and redis_config_unix_socket_perm %}
unixsocket {{ redis_config_unix_socket_path }}
unixsocketperm {{ redis_config_unix_socket_perm }}
{% endif %}
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0