美文网首页
Docker Compose部署Redis

Docker Compose部署Redis

作者: LainCheung | 来源:发表于2019-05-07 17:46 被阅读0次

docker-compose.yml配置

version: '3'

services:
  redis:
    image: redis:latest
    container_name: redis
    restart: always
    ports:
      - 6379:6379
    volumes:
       - ./redis.conf:/etc/redis/redis.conf:rw
       - ./redis-data/:/data:rw
    command:
      # 执行的命令
      redis-server /etc/redis/redis.conf --appendonly yes

redis.conf配置

requirepass 123456
appendonly yes
daemonize no

相关文章

网友评论

      本文标题:Docker Compose部署Redis

      本文链接:https://www.haomeiwen.com/subject/kvuyoqtx.html