美文网首页
docker下部署 dubbo-admin + nacos

docker下部署 dubbo-admin + nacos

作者: 炒面Z | 来源:发表于2021-10-29 14:36 被阅读0次

    参考文档:
    https://github.com/apache/dubbo-admin/blob/develop/dubbo-admin-server/src/main/resources/application.properties

    由于 & 特殊字符会导致运行失败,所以含有&等特殊字符的变量需要单引号包裹

    • 原生 docker run写法
    docker run -d \
    -p 9001:8080 \
    -e admin.root.user.name=root \
    -e admin.root.user.password=xxx \
    -e admin.registry.address='nacos://xxx.cn:8848?group=DEFAULT_GROUP&namespace=test' \
    -e admin.config-center='nacos://xxx.cn:8848?group=DEFAULT_GROUP&namespace=test' \
    -e admin.metadata-report.address='nacos://xxx.cn:8848?group=dubbo&namespace=test' \
    --network swarm-overlay \
    --name dubbo-admin apache/dubbo-admin
    
    
    • docker-compose写法
    version: '3.0'
    services:
      dubbo-admin:
        image: apache/dubbo-admin
        ports:
          - "9001:8080"
        networks:
          swarm-overlay: {}
        environment:
            - admin.root.user.name=root
            - admin.root.user.password=xxx
        - admin.registry.address='nacos://xx:8848?group=DEFAULT_GROUP&namespace=test'
        - admin.config-center='nacos://xx:8848?group=DEFAULT_GROUP&namespace=test'
        - admin.metadata-report.address='nacos://xx:8848?group=dubbo&namespace=test'
        restart: on-failure
        cpu_count: 1
        mem_limit: 512m
    networks:
      swarm-overlay:
        external: true
    

    相关文章

      网友评论

          本文标题:docker下部署 dubbo-admin + nacos

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