docker compose 启动 redis

redis.yml

version: "2.4"
services:
  redis:
    image: redis:6.2.1
    container_name: redis
    environment:
      - TZ=Asia/Shanghai
        #      - redisPWD=cl0udsuit1
    privileged: true
    pid: "host"
    network_mode: "host"
    volumes:
      - /etc/hosts:/etc/hosts
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
      - /opt/haihe/redis/redis.conf:/etc/redis.conf
      - /var/lib/redis:/var/lib/redis
      - /var/log/redis:/var/log/redis
    command:
      redis-server /etc/redis.conf
    ulimits:
      nproc: 65535
      nofile:
        soft: 20000
        hard: 40000
    ports:
       - "6379:6379"
    restart: always

redis.conf

#分别填写内网IP
bind 0.0.0.0

#设置密码
#requirepass cl0udsuit1

#修改连接参数
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 0 0 0
client-output-buffer-limit pubsub 0 0 0

相关推荐

  1. DockerCompose

    2024-03-29 19:02:03       42 阅读
  2. Redis启动方式

    2024-03-29 19:02:03       41 阅读
  3. docker compose 启动 redis

    2024-03-29 19:02:03       19 阅读
  4. Redis:三种启动方式

    2024-03-29 19:02:03       10 阅读

最近更新

  1. 6、Redis系统-数据结构-01-String

    2024-03-29 19:02:03       0 阅读
  2. STM32学习和实践笔记(39):I2C EEPROM实验

    2024-03-29 19:02:03       1 阅读
  3. Python面试题:请解释什么是反射(reflection)?

    2024-03-29 19:02:03       1 阅读
  4. Rudolf and k Bridges——Codeforces Round 933 (Div. 3) E

    2024-03-29 19:02:03       1 阅读
  5. 墨烯的C语言技术栈-C语言基础-010

    2024-03-29 19:02:03       1 阅读
  6. html5路由如何在nginx上部署(vite+vue3)

    2024-03-29 19:02:03       1 阅读
  7. nodejs学习之glob

    2024-03-29 19:02:03       1 阅读

热门阅读

  1. el-tree 树形控件

    2024-03-29 19:02:03       22 阅读
  2. Elasticsearch如何处理多个关键字查询

    2024-03-29 19:02:03       18 阅读
  3. kibana和elasticsearch的关系

    2024-03-29 19:02:03       20 阅读
  4. 关于vue 的生命周期的教程

    2024-03-29 19:02:03       18 阅读
  5. 速盾:vue可以用cdn吗

    2024-03-29 19:02:03       22 阅读
  6. lvgl移植以及使用记录(1)

    2024-03-29 19:02:03       22 阅读
  7. 基于单片机的智能交通灯控制系统设计

    2024-03-29 19:02:03       24 阅读
  8. git教程

    git教程

    2024-03-29 19:02:03      26 阅读
  9. 等级保护安全扩展要求测评对象分析汇总

    2024-03-29 19:02:03       19 阅读