From: Rafael dos Santos Silva Date: Wed, 11 Nov 2020 15:47:29 +0000 (-0300) Subject: Upgrade to Redis 6.0.9 (#487) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=86b9032bbe75cfd11476c44a5c62f8882dd8ad97;p=discourse_docker.git Upgrade to Redis 6.0.9 (#487) This unlocks using the new I/O Threads feature of Redis 6.X. In order to support it the redis template file now accepts a parameter allowing an operator to enable it and pick how many threads. By default sets threads to 1, which disables the feature and acts like redis 5. --- diff --git a/image/base/install-redis b/image/base/install-redis index 00c40e6..7a3cf22 100755 --- a/image/base/install-redis +++ b/image/base/install-redis @@ -2,8 +2,8 @@ set -e # version check: https://redis.io/ -REDIS_VERSION=5.0.9 -REDIS_HASH="53d0ae164cd33536c3d4b720ae9a128ea6166ebf04ff1add3b85f1242090cb85" +REDIS_VERSION=6.0.9 +REDIS_HASH="dc2bdcf81c620e9f09cfd12e85d3bc631c897b2db7a55218fd8a65eaa37f86dd" cd /tmp # Prepare Redis source. diff --git a/templates/redis.template.yml b/templates/redis.template.yml index 44bbca1..b5d2a2b 100644 --- a/templates/redis.template.yml +++ b/templates/redis.template.yml @@ -1,3 +1,6 @@ +params: + redis_io_threads: "1" + run: - file: path: /etc/service/redis/run @@ -53,6 +56,11 @@ run: from: /^protected-mode yes/ to: "protected-mode no" + - replace: + filename: "/etc/redis/redis.conf" + from: "# io-threads 4" + to: "io-threads $redis_io_threads" + - exec: cmd: echo redis installed hook: redis