liunx docker 部署 nacos seata sentinel

部署nacos

1.按要求创建好数据库

2.创建docker 容器

复制代码
docker run -d --name nacos-server -p 8848:8848 -p 9848:9848 -p 9849:9849 -e MODE=standalone -e SPRING_DATASOURCE_PLATFORM=mysql -e MYSQL_SERVICE_HOST=172.17.251.166 -e MYSQL_SERVICE_DB_NAME=ry-config -e MYSQL_SERVICE_PORT=3306 -e MYSQL_SERVICE_USER=root -e MYSQL_SERVICE_PASSWORD=TnF4mLZfW4B46fejDCt6QVC0XRP6of0H nacos/nacos-server:latest

部署seata

1.编辑配置文件registry.conf

复制代码
registry {
  # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
  type = "nacos"

  nacos {
    application = "seata-server"
    serverAddr = "172.17.251.166:8848"
    group = "DEFAULT_GROUP"
    namespace = ""
    cluster = "DEFAULT"
    username = "nacos"
    password = "nacos"
  }
  file {
    name = "file.conf"
  }
}

config {
  # file、nacos 、apollo、zk、consul、etcd3
  type = "nacos"

  nacos {
    serverAddr = "172.17.251.166:8848"
    namespace = ""
    group = "SEATA_GROUP"
    username = "nacos"
    password = "nacos"
    dataId = "seataServer.properties"
  }
  file {
    name = "file.conf"
  }
}

2.编写seata在nacos配置中心的seataServer.properties 配置文件

复制代码
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj.jdbc.Driver
store.db.url=jdbc:mysql://172.17.251.166:3306/ry-seata?rewriteBatchedStatements=true
store.db.user=root
store.db.password=TnF4mLZfW4B46fejDCt6QVC0XRP6of0H
store.db.minConn=5
store.db.maxConn=30
store.db.globalTable=global_table
store.db.branchTable=branch_table
store.db.queryLimit=100
store.db.lockTable=lock_table
store.db.maxWait=5000

3.启动容器

复制代码
docker run --name seata-server142 -d\
        -p 8091:8091 \
		-p 7091:7091 \
        -e SEATA_IP=172.17.251.166 \
		-e SEATA_PORT=8091 \
        -e SEATA_CONFIG_NAME=file:/root/seata-config/registry \
        -v /opt/docker-data/seata/config:/root/seata-config  \
        seataio/seata-server:1.4.2

部署sentinel

复制代码
docker run --name sentinel -d -p 8858:8858 -v /opt/docker-data/sentinel/app:/root/sentinel bladex/sentinel-dashboard
相关推荐
小Wang19 小时前
npm私有库创建(docker+verdaccio)
前端·docker·npm
容器魔方3 天前
Bloomberg 正式加入 Karmada 用户组!
云原生·容器·云计算
muyun28003 天前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
Nazi63 天前
k8s的dashboard
云原生·容器·kubernetes
波波烤鸭3 天前
Redis 高可用实战源码解析(Sentinel + Cluster 整合应用)
数据库·redis·sentinel
傻傻虎虎3 天前
【Docker】常用帮忙、镜像、容器、其他命令合集(2)
运维·docker·容器
是小崔啊3 天前
叩丁狼K8s - 概念篇
云原生·容器·kubernetes
2401_897930063 天前
使用Docker轻松部署Neo4j图数据库
数据库·docker·neo4j
LeeZhao@4 天前
【AI推理部署】Docker篇04—Docker自动构建镜像
人工智能·docker·容器
程思扬4 天前
利用JSONCrack与cpolar提升数据可视化及跨团队协作效率
网络·人工智能·经验分享·docker·信息可视化·容器·架构