From 2d94522bd07b47d65616cfebb4f7a12eee47e248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= <184172133@qq.com> Date: Sun, 28 Jan 2024 16:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5=EF=BC=8Cfeat?= =?UTF-8?q?=EF=BC=9Amaven=20=E5=B7=A5=E7=A8=8B=E8=84=9A=E6=89=8B=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev-ops/docker-compose.yml | 2 ++ docs/dev-ops/redis/redis.conf | 3 ++- docs/dev-ops/redis/users.acl | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docs/dev-ops/redis/users.acl diff --git a/docs/dev-ops/docker-compose.yml b/docs/dev-ops/docker-compose.yml index bf7706c..52e15b3 100644 --- a/docs/dev-ops/docker-compose.yml +++ b/docs/dev-ops/docker-compose.yml @@ -65,6 +65,7 @@ services: - 8081:8081 environment: - REDIS_HOSTS=local:redis:6379 +# - REDIS_HOSTS=local:admin:admin@redis:6379 # redis 配置 users.acl 账密则启动此配置,注释掉上一个配置【不使用密码的方式】。 - HTTP_USER=admin - HTTP_PASSWORD=admin networks: @@ -83,6 +84,7 @@ services: - 6379:6379 volumes: - ./redis/redis.conf:/usr/local/etc/redis/redis.conf +# - ./redis/users.acl:/usr/local/etc/redis/users.acl command: redis-server /usr/local/etc/redis/redis.conf networks: - my-network diff --git a/docs/dev-ops/redis/redis.conf b/docs/dev-ops/redis/redis.conf index f6f3781..1c7aca9 100644 --- a/docs/dev-ops/redis/redis.conf +++ b/docs/dev-ops/redis/redis.conf @@ -1,2 +1,3 @@ bind 0.0.0.0 -port 6379 \ No newline at end of file +port 6379 +aclfile /usr/local/etc/redis/users.acl \ No newline at end of file diff --git a/docs/dev-ops/redis/users.acl b/docs/dev-ops/redis/users.acl new file mode 100644 index 0000000..b56c1f4 --- /dev/null +++ b/docs/dev-ops/redis/users.acl @@ -0,0 +1 @@ +user admin on >admin allcommands allkeys \ No newline at end of file -- GitLab