美文网首页
docker-compose部署mysql,redis,rabb

docker-compose部署mysql,redis,rabb

作者: 架构师与哈苏 | 来源:发表于2020-08-05 16:11 被阅读0次
    version: '3'
    services:
       mysql:
        image: mysql:5.7.31
        container_name: mysql
        restart: always
        command: --character-set-server=utf8 --collation-server=utf8_general_ci
        ports:
          - 10144:3306
        environment:
          MYSQL_ROOT_PASSWORD: 123456
          MYSQL_ROOT_HOST: '%'
        volumes:
          - /var/docker/mysql/data:/var/lib/mysql
          - /var/docker/mysql/config:/etc/mysql/conf.d
       redis:
         image: redis:6.0.6
         container_name: myRedis
         restart: always
         ports:
           - 10145:6379
         volumes:
           - /var/redis/data:/data:rw
           - /usr/local/redis/redis.conf:/etc/redis/redis.conf:rw
         command:
           redis-server /etc/redis/redis.conf
       rabbitmq:
         image: rabbitmq:management
         container_name: myrabbitmq
         hostname: myrabbitmq
         ports:
           - 10142:5672
           - 10143:15672
         volumes:
           - /var/docker/rabbitmq/data:/var/lib/rabbitmq
         environment:
           - RABBITMQ_DEFAULT_USER=admin
           - RABBITMQ_DEFAULT_PASS=123456
    

    相关文章

      网友评论

          本文标题:docker-compose部署mysql,redis,rabb

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