diff --git a/docs/dev-ops/docker-compose.yml b/docs/dev-ops/docker-compose.yml index bf7706cb019996c226007c82ac28afbb488834c7..52e15b3a3ef0f97589b340b0264c29b35f8fb640 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 f6f37818750708730604af730b66e0a569367be7..1c7aca9d78f82ebbd08ba955a8de39e6f5d309d6 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 0000000000000000000000000000000000000000..b56c1f47326a5cf5cf8900f8ebcec6aacf7cabc2 --- /dev/null +++ b/docs/dev-ops/redis/users.acl @@ -0,0 +1 @@ +user admin on >admin allcommands allkeys \ No newline at end of file