国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ)

這篇具有很好參考價(jià)值的文章主要介紹了docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ)

環(huán)境

詳情環(huán)境可參考
https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E

我這里

<spring.cloud.alibaba-version>2021.1</spring.cloud.alibaba-version>

所有選擇seata版本為 1.3.0

docker-compose 部署seata

前提:已經(jīng)安裝好nacos和postgresql

  1. 創(chuàng)建好數(shù)據(jù)庫(kù) 名稱:seata
    執(zhí)行以下sql:
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
-- the table to store GlobalSession data
CREATE TABLE IF NOT EXISTS public.global_table
(
    xid                       VARCHAR(128) NOT NULL,
    transaction_id            BIGINT,
    status                    SMALLINT     NOT NULL,
    application_id            VARCHAR(32),
    transaction_service_group VARCHAR(32),
    transaction_name          VARCHAR(128),
    timeout                   INT,
    begin_time                BIGINT,
    application_data          VARCHAR(2000),
    gmt_create                TIMESTAMP(0),
    gmt_modified              TIMESTAMP(0),
    CONSTRAINT pk_global_table PRIMARY KEY (xid)
);

CREATE INDEX idx_status_gmt_modified ON public.global_table (status, gmt_modified);
CREATE INDEX idx_transaction_id ON public.global_table (transaction_id);

-- the table to store BranchSession data
CREATE TABLE IF NOT EXISTS public.branch_table
(
    branch_id         BIGINT       NOT NULL,
    xid               VARCHAR(128) NOT NULL,
    transaction_id    BIGINT,
    resource_group_id VARCHAR(32),
    resource_id       VARCHAR(256),
    branch_type       VARCHAR(8),
    status            SMALLINT,
    client_id         VARCHAR(64),
    application_data  VARCHAR(2000),
    gmt_create        TIMESTAMP(6),
    gmt_modified      TIMESTAMP(6),
    CONSTRAINT pk_branch_table PRIMARY KEY (branch_id)
);

CREATE INDEX idx_xid ON public.branch_table (xid);

-- the table to store lock data
CREATE TABLE IF NOT EXISTS public.lock_table
(
    row_key        VARCHAR(128) NOT NULL,
    xid            VARCHAR(128),
    transaction_id BIGINT,
    branch_id      BIGINT       NOT NULL,
    resource_id    VARCHAR(256),
    table_name     VARCHAR(32),
    pk             VARCHAR(36),
    status         SMALLINT     NOT NULL DEFAULT 0,
    gmt_create     TIMESTAMP(0),
    gmt_modified   TIMESTAMP(0),
    CONSTRAINT pk_lock_table PRIMARY KEY (row_key)
);

comment on column public.lock_table.status is '0:locked ,1:rollbacking';
CREATE INDEX idx_branch_id ON public.lock_table (branch_id);
CREATE INDEX idx_xid ON public.lock_table (xid);
CREATE INDEX idx_status ON public.lock_table (status);

CREATE TABLE distributed_lock (
    lock_key     VARCHAR(20)  NOT NULL,
    lock_value        VARCHAR(20)  NOT NULL,
    expire       BIGINT       NOT NULL,
    CONSTRAINT pk_distributed_lock_table PRIMARY KEY (lock_key)
);

INSERT INTO distributed_lock (lock_key, lock_value, expire) VALUES ('AsyncCommitting', ' ', 0);
INSERT INTO distributed_lock (lock_key, lock_value, expire) VALUES ('RetryCommitting', ' ', 0);
INSERT INTO distributed_lock (lock_key, lock_value, expire) VALUES ('RetryRollbacking', ' ', 0);
INSERT INTO distributed_lock (lock_key, lock_value, expire) VALUES ('TxTimeoutCheck', ' ', 0);

其他的sql可以參考:
https://github.com/seata/seata/tree/develop/script/server/db

服務(wù)器層級(jí)結(jié)構(gòu):
docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring

2.先運(yùn)行一個(gè)seata容器,目的為了把seata相關(guān)的配置文件拷貝處理,方便后續(xù)使用

docker run --name seata-server -p 8091:8091 -d  seataio/seata-server:1.3.0
docker cp seata-server:/seata-server /opt/seata/resources

3.然后將該容器刪除

docker stop seata-server
docker rm  seata-server

4, 修改后的file.conf

## transaction log store, only used in seata-server
store {
  ## store mode: file、db、redis
  mode = "db"

  ## file store property
  file {
    ## store location dir
    dir = "sessionStore"
    # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
    maxBranchSessionSize = 16384
    # globe session size , if exceeded throws exceptions
    maxGlobalSessionSize = 512
    # file buffer size , if exceeded allocate new buffer
    fileWriteBufferCacheSize = 16384
    # when recover batch read size
    sessionReloadReadSize = 100
    # async, sync
    flushDiskMode = async
  }

  ## database store property
  db {
    ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc.
    ## datasource = "druid"
    ## mysql/oracle/postgresql/h2/oceanbase etc.
    dbType = "postgresql"
    driverClassName = "org.postgresql.Driver"
    url = "jdbc:postgresql://101.35.249.216:5432/seata"
    user = "root"
    password = "root"
    minConn = 5
    maxConn = 30
    globalTable = "global_table"
    branchTable = "branch_table"
    lockTable = "lock_table"
    queryLimit = 100
    maxWait = 5000
  }

  ## redis store property
  redis {
    host = "127.0.0.1"
    port = "6379"
    password = ""
    database = "0"
    minConn = 1
    maxConn = 10
    queryLimit = 100
  }

}

修改細(xì)節(jié)如下圖:
docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring
修改后的registry.conf:

registry {
  # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
  type = "nacos"

  nacos {
    application = "seata-server"
    serverAddr = "nacos.carbonease.cn:80"
    group = "SEATA_GROUP"
    namespace = "cfa514ed-1caf-4d2b-8645-8dbee0f3933f"
    cluster = "default"
    username = "nacos"
    password = "Carbonease@2022"
  }
  eureka {
    serviceUrl = "http://localhost:8761/eureka"
    application = "default"
    weight = "1"
  }
  redis {
    serverAddr = "localhost:6379"
    db = 0
    password = ""
    cluster = "default"
    timeout = 0
  }
  zk {
    cluster = "default"
    serverAddr = "127.0.0.1:2181"
    sessionTimeout = 6000
    connectTimeout = 2000
    username = ""
    password = ""
  }
  consul {
    cluster = "default"
    serverAddr = "127.0.0.1:8500"
  }
  etcd3 {
    cluster = "default"
    serverAddr = "http://localhost:2379"
  }
  sofa {
    serverAddr = "127.0.0.1:9603"
    application = "default"
    region = "DEFAULT_ZONE"
    datacenter = "DefaultDataCenter"
    cluster = "default"
    group = "SEATA_GROUP"
    addressWaitTime = "3000"
  }
  file {
    name = "file.conf"
  }
}

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

  nacos {
    serverAddr = "nacos.carbonease.cn:80"
    namespace = "cfa514ed-1caf-4d2b-8645-8dbee0f3933f"
    group = "SEATA_GROUP"
    username = "nacos"
    password = "Carbonease@2022"
  }
  consul {
    serverAddr = "127.0.0.1:8500"
  }
  apollo {
    appId = "seata-server"
    apolloMeta = "http://192.168.1.204:8801"
    namespace = "application"
  }
  zk {
    serverAddr = "127.0.0.1:2181"
    sessionTimeout = 6000
    connectTimeout = 2000
    username = ""
    password = ""
  }
  etcd3 {
    serverAddr = "http://localhost:2379"
  }
  file {
    name = "file.conf"
  }
}

修改細(xì)節(jié)如下圖:
docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring
docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring
/opt/seata目錄下創(chuàng)建 config.txt
內(nèi)容如下:

transport.type=TCP
transport.server=NIO
transport.heartbeat=true
transport.enableClientBatchSendRequest=false
transport.threadFactory.bossThreadPrefix=NettyBoss
transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
transport.threadFactory.shareBossWorker=false
transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
transport.threadFactory.clientSelectorThreadSize=1
transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
transport.threadFactory.bossThreadSize=1
transport.threadFactory.workerThreadSize=default
transport.shutdown.wait=3
service.vgroupMapping.my_test_tx_group=default
service.default.grouplist=127.0.0.1:8091
service.enableDegrade=false
service.disableGlobalTransaction=false
client.rm.asyncCommitBufferLimit=10000
client.rm.lock.retryInterval=10
client.rm.lock.retryTimes=30
client.rm.lock.retryPolicyBranchRollbackOnConflict=true
client.rm.reportRetryCount=5
client.rm.tableMetaCheckEnable=false
client.rm.sqlParserType=druid
client.rm.reportSuccessEnable=false
client.rm.sagaBranchRegisterEnable=false
client.tm.commitRetryCount=5
client.tm.rollbackRetryCount=5
client.tm.defaultGlobalTransactionTimeout=60000
client.tm.degradeCheck=false
client.tm.degradeCheckAllowTimes=10
client.tm.degradeCheckPeriod=2000
##將此處的file修改為db
store.mode=db
store.file.dir=file_store/data
store.file.maxBranchSessionSize=16384
store.file.maxGlobalSessionSize=512
store.file.fileWriteBufferCacheSize=16384
store.file.flushDiskMode=async
store.file.sessionReloadReadSize=100
##配置數(shù)據(jù)
store.db.datasource=druid
store.db.dbType=postgresql
store.db.driverClassName=org.postgresql.Driver
store.db.url=jdbc:postgresql://101.35.249.216:5432/seata
store.db.user=root
store.db.password=root
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
store.redis.host=127.0.0.1
store.redis.port=6379
store.redis.maxConn=10
store.redis.minConn=1
store.redis.database=0
store.redis.password=null
store.redis.queryLimit=100
server.recovery.committingRetryPeriod=1000
server.recovery.asynCommittingRetryPeriod=1000
server.recovery.rollbackingRetryPeriod=1000
server.recovery.timeoutRetryPeriod=1000
server.maxCommitRetryTimeout=-1
server.maxRollbackRetryTimeout=-1
server.rollbackRetryTimeoutUnlockEnable=false
client.undo.dataValidation=true
client.undo.logSerialization=jackson
client.undo.onlyCareUpdateColumns=true
server.undo.logSaveDays=7
server.undo.logDeletePeriod=86400000
client.undo.logTable=undo_log
client.log.exceptionRate=100
transport.serialization=seata
transport.compressor=none
metrics.enabled=false
metrics.registryType=compact
metrics.exporterList=prometheus
metrics.exporterPrometheusPort=9898
service.vgroup-mapping.sub-tx-group=default
service.vgroup-mapping.admin-tx-group=

修改內(nèi)容如下:
docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring

在 /opt/seata 下創(chuàng)建 scrip目錄
在scrip目錄下 創(chuàng)建腳本 nacos-config.sh
nacos-config.sh內(nèi)容如下:

#!/bin/sh
# Copyright 1999-2019 Seata.io Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at、
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

while getopts ":h:p:g:t:u:w:" opt
do
  case $opt in
  h)
    host=$OPTARG
    ;;
  p)
    port=$OPTARG
    ;;
  g)
    group=$OPTARG
    ;;
  t)
    tenant=$OPTARG
    ;;
  u)
    username=$OPTARG
    ;;
  w)
    password=$OPTARG
    ;;
  ?)
    echo " USAGE OPTION: $0 [-h host] [-p port] [-g group] [-t tenant] [-u username] [-w password] "
    exit 1
    ;;
  esac
done

if [ -z ${host} ]; then
    host=localhost
fi
if [ -z ${port} ]; then
    port=8848
fi
if [ -z ${group} ]; then
    group="SEATA_GROUP"
fi
if [ -z ${tenant} ]; then
    tenant=""
fi
if [ -z ${username} ]; then
    username=""
fi
if [ -z ${password} ]; then
    password=""
fi

nacosAddr=$host:$port
contentType="content-type:application/json;charset=UTF-8"

echo "set nacosAddr=$nacosAddr"
echo "set group=$group"

urlencode() {
  length="${#1}"
  i=0
  while [ $length -gt $i ]; do
    char="${1:$i:1}"
    case $char in
    [a-zA-Z0-9.~_-]) printf $char ;;
    *) printf '%%%02X' "'$char" ;;
    esac
    i=`expr $i + 1`
  done
}

failCount=0
tempLog=$(mktemp -u)
function addConfig() {
  dataId=`urlencode $1`
  content=`urlencode $2`
  curl -X POST -H "${contentType}" "http://$nacosAddr/nacos/v1/cs/configs?dataId=$dataId&group=$group&content=$content&tenant=$tenant&username=$username&password=$password" >"${tempLog}" 2>/dev/null
  if [ -z $(cat "${tempLog}") ]; then
    echo " Please check the cluster status. "
    exit 1
  fi
  if [ "$(cat "${tempLog}")" == "true" ]; then
    echo "Set $1=$2 successfully "
  else
    echo "Set $1=$2 failure "
    failCount=`expr $failCount + 1`
  fi
}

count=0
for line in $(cat $(dirname "$PWD")/config.txt | sed s/[[:space:]]//g); do
    count=`expr $count + 1`
        key=${line%%=*}
    value=${line#*=}
        addConfig "${key}" "${value}"
done

echo "========================================================================="
echo " Complete initialization parameters,  total-count:$count ,  failure-count:$failCount "
echo "========================================================================="

if [ ${failCount} -eq 0 ]; then
        echo " Init nacos config finished, please start seata-server. "
else
        echo " init nacos config fail. "
fi

修改sh文件的權(quán)限

chmod +x nacos-config.sh

將配置文件推送至Nacos:

bash ./nacos-config.sh -h nacos.carbonease.cn  -p 80  -g SEATA_GROUP -t cfa514ed-1caf-4d2b-8645-8dbee0f3933f

命令格式:

sh nacos-config.sh -h  Nacos地址  -p nacos端口號(hào) -g SEATA_GROUP(此處是配置文件的分組名稱,可以不改) -t 在nacos配置的seata命名空間ID

docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring
推送成功

創(chuàng)建 docker-compose.yml 文件

version: "3"
services:
  seata-server:
    image: seataio/seata-server:1.3.0
    container_name: seata-server
    hostname: seata-server
    ports:
      - "8091:8091"
    environment:
      - SEATA_PORT=8091
      - STORE_MODE=db
      - SEATA_IP=101.35.249.216 ##將此處的IP替換為docker宿主機(jī)的IP
    restart: 'no'
    volumes:
      - "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime"        #設(shè)置系統(tǒng)時(shí)區(qū)
      - "/usr/share/zoneinfo/Asia/Shanghai:/etc/timezone"  #設(shè)置時(shí)區(qū)
      - "./resources:/seata-server/resources"

啟動(dòng)

docker-compose up -d

docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ),spring cloud,spring boot,spring
成功注冊(cè)上nacos!

springCloud項(xiàng)目整合:

pom文件:

    <!-- seata分布式事務(wù)-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.seata</groupId>
                    <artifactId>seata-spring-boot-starter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-spring-boot-starter</artifactId>
            <version>1.3.0</version>
        </dependency>

客戶端和服務(wù)端的版本一定要一致,否則可能出現(xiàn)

no available service 'default' found, please make sure registry config correct

yml文件中:

seata:
  application-id: ${spring.application.name}
  enabled: true
  tx-service-group: my_test_tx_group #此處的配置來(lái)源于上述步驟中config.txt中的service.vgroupMapping.my_test_tx_group=default
  registry:
    type: nacos
    nacos:
      server-addr: nacos.carbonease.cn:80 #nacos的連接地址
      namespace: cfa514ed-1caf-4d2b-8645-8dbee0f3933f      #在nacos中創(chuàng)建的seata命名空間ID
      group: SEATA_GROUP #seata配置的分組名稱
      cluster: default
      username: nacos
      password: Carbonease@2022
  config:
    type: nacos
    nacos:
      server-addr: nacos.carbonease.cn:80 #nacos的連接地址
      namespace: cfa514ed-1caf-4d2b-8645-8dbee0f3933f #在nacos中創(chuàng)建的seata命名空間ID
      group: SEATA_GROUP #seata配置的分組名稱
      username: nacos
      password: Carbonease@2022
  service:
    vgroup-mapping:
      my_test_tx_group: default #此處的配置來(lái)源于上述步驟中config.txt中的service.vgroupMapping.my_test_tx_group=default
      #注意:此處的my_test_tx_group需要和上面seata.tx-service-group以及config.txt中的配置對(duì)應(yīng)

jdk8以上的需要設(shè)置啟動(dòng)參數(shù):

--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED 

否則可能出現(xiàn):

Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @9d5509a

然后,服務(wù)所涉及到的數(shù)據(jù)庫(kù)需要加上日志表:

-- 日志表
CREATE TABLE IF NOT EXISTS public.undo_log
(
    id            BIGINT   NOT NULL,
    branch_id     BIGINT   NOT NULL,
    xid           VARCHAR(100) NOT NULL,
    context       VARCHAR(128) NOT NULL,
    rollback_info bytea     NOT NULL,
    log_status    INT          NOT NULL,
    log_created   TIMESTAMP(6)     NOT NULL,
    log_modified  TIMESTAMP(6)     NOT NULL,
     CONSTRAINT pk_undo_log PRIMARY KEY (id)
);
CREATE SEQUENCE undo_log_id_seq START 1;

最后:
服務(wù)A 調(diào)用 服務(wù)B
在服務(wù)A的Service上加注解

@GlobalTransactional(rollbackFor = Exception.class)

服務(wù)B是Service上加注解

@Transactional(rollbackFor = Exception.class)

大功告成!!文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-693866.html

到了這里,關(guān)于docker-compose 部署 Seata整合nacos,Postgresql 為DB存儲(chǔ)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【nacos】【sentinel】【gateway】docker-compose安裝及web項(xiàng)目部署

    【centos】【docker】安裝啟動(dòng) 【docker-compose】安裝使用 啟動(dòng)docker-compose配置文件

    2024年02月11日
    瀏覽(45)
  • SpringCloud整合Seata1.6.1部署與使用Nacos方式

    SpringCloud整合Seata1.6.1部署與使用Nacos方式

    seata官網(wǎng):http://seata.io/zh-cn/index.html seata-server: https://github.com/seata/seata/releases SpringCloud整合Seata出現(xiàn)異常數(shù)據(jù)未回滾的解決方案 1.1 下載seater-server 下載指定版本seata-server,本案例使用 v1.6.1 版本。 1.2 修改seata/conf/application.yml配置文件(已刪除無(wú)用配置) 【注意】 seata.config.type

    2024年02月03日
    瀏覽(20)
  • 使用Docker-compose快速構(gòu)建Nacos服務(wù)

    使用Docker-compose快速構(gòu)建Nacos服務(wù)

    在微服務(wù)架構(gòu)中,服務(wù)的注冊(cè)與發(fā)現(xiàn)扮演著至關(guān)重要的角色。Nacos(Naming and Configuration Service)是阿里巴巴開(kāi)源的服務(wù)注冊(cè)與發(fā)現(xiàn)組件,致力于支持動(dòng)態(tài)配置管理和服務(wù)發(fā)現(xiàn)。最近,一位朋友表達(dá)了對(duì)搭建一套Nacos開(kāi)發(fā)環(huán)境的興趣。先前,我們?cè)l(fā)布了一篇有關(guān)在Linux上直接部

    2024年01月24日
    瀏覽(29)
  • docker-compose安裝nacos和msql

    docker-compose安裝nacos和msql

    點(diǎn)擊鏈接跳轉(zhuǎn)選擇自己需要的版本然后下載linux版本即可。 我這里選擇的是2.3.0 下載后解壓上傳到自己的虛擬機(jī)中選定的目錄下: 打開(kāi)standalone-mysql-8.yaml 我這里選擇的是mysql8,所以修改的是mysql8的文件,如果是5的話選擇5.7那個(gè)文件。 修改容器名 上面框內(nèi)是容器名,可以自定

    2024年02月04日
    瀏覽(27)
  • 【初識(shí) Docker | 中級(jí)篇】 Docker 中使用 docker-compose 安裝 Nacos

    【初識(shí) Docker | 中級(jí)篇】 Docker 中使用 docker-compose 安裝 Nacos

    可以按照以下步驟在 Docker 中安裝 Nacos 拉取 nacos 鏡像: docker pull nacos/nacos-server 運(yùn)行 nacos 容器: docker run --name nacos -e MODE=standalone -p 8848:8848 -d nacos/nacos-server 訪問(wèn) nacos 控制臺(tái):打開(kāi)瀏覽器,在地址欄中輸入 http://localhost:8848/nacos ,訪問(wèn) nacos 控制臺(tái)。 提示:以下是本篇文章正文內(nèi)容

    2024年02月15日
    瀏覽(22)
  • 【Nacos】1.docker-compose 安裝nacos 2.1.0 報(bào)錯(cuò) no datasource set

    【Nacos】1.docker-compose 安裝nacos 2.1.0 報(bào)錯(cuò) no datasource set

    返回首頁(yè) ? 【筆記】Spring Cloud Alibaba Nacos ? ? ? ? 如何優(yōu)雅安裝nacos,請(qǐng)參考? 解決方案。 ????????單體架構(gòu)拆分后,微服務(wù)越來(lái)越多,需要注冊(cè)中心管理(前期因?yàn)楣ぷ髅o(wú)法一開(kāi)始使用注冊(cè)中心),選用nacos,所以數(shù)據(jù)庫(kù)已經(jīng)安裝,官方文檔提供的例子適合沒(méi)有安裝

    2024年01月19日
    瀏覽(31)
  • docker-compose 搭建 ELK 7.X 并整合 SpringBoot

    docker-compose 搭建 ELK 7.X 并整合 SpringBoot

    項(xiàng)目地址: RuoYi-Cloud-Plus 目錄結(jié)構(gòu) 注意: elasticsearch 內(nèi)的所有文件夾都需要有寫(xiě)權(quán)限 chmod 777 /docker/elk/elasticsearch/data chmod 777 /docker/elk/elasticsearch/logs docker-compose 編排 為了便于測(cè)試 這里使用 host 網(wǎng)絡(luò)模式 可根據(jù)需求自行調(diào)整 kibana配置 kibana.yml logstash配置 服務(wù)主體配置 logstash.ym

    2024年02月11日
    瀏覽(16)
  • docker-compose的部署

    docker-compose的部署

    目錄 一、compose的概述 1.1 yaml的概述 1.2 yaml的數(shù)據(jù)結(jié)構(gòu) 1.2.1 docker composeyml文件的常用手段 1.3?docker compose 1.4 yml文件編寫(xiě) ?二、部署compose 2.1 下載docker-compose安裝包 ?2.2 部署docker-compose 2.3 部署docker-compose 2.4 開(kāi)啟驗(yàn)證 ?三、compose編排安裝tomcat容器 總結(jié) compose是docker官網(wǎng)開(kāi)發(fā)的,

    2024年02月01日
    瀏覽(27)
  • Docker-Compose編排與部署

    Docker-Compose編排與部署

    目錄 Docker Compose Compose的優(yōu)點(diǎn) 編排和部署 Compose原理 Compose應(yīng)用案例 安裝docker-ce 阿里云鏡像加速器 安裝docker-compose docker-compose用法 Yaml簡(jiǎn)介 驗(yàn)證LNMP環(huán)境? ????????Docker Compose 的前身是 Fig,它是一個(gè) 定義及運(yùn)行多個(gè) Docker 容器的工具 ??梢允褂?YAML 文件來(lái)配置應(yīng)用程序的服

    2024年02月14日
    瀏覽(26)
  • docker-compose部署redis

    docker-compose部署redis

    docker-compose是什么? Docker Compose是一個(gè)用于 定義和運(yùn)行多個(gè)容器Docker應(yīng)用程序的工具 。它允許您定義一組容器,這些容器組成一個(gè)完整的應(yīng)用程序,且這些容器之間可以互相通信。通過(guò)Docker Compose,您可以使用一個(gè)單獨(dú)的文件來(lái)定義應(yīng)用程序的 服務(wù)、網(wǎng)絡(luò)、卷等元素,并且可

    2024年02月12日
    瀏覽(25)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包