美文网首页
redis docker-compose 部署

redis docker-compose 部署

作者: 炒面Z | 来源:发表于2021-09-06 16:52 被阅读0次

redis安装redis

version: '3'

services:
  redis:
    image: redis:latest
    container_name: redis
    restart: always
    ports:
      - 6379:6379
    networks:
      - mynetwork
    volumes:
      - ./redis.conf:/usr/local/etc/redis/redis.conf:rw
      - ./data:/data:rw
    command:
      /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf --requirepass yourpassword"
networks:
  mynetwork:
    external: true

相关文章

网友评论

      本文标题:redis docker-compose 部署

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