hunshimowang6 commented on issue #8150:
URL: 
https://github.com/apache/incubator-seata/issues/8150#issuecomment-4828277487

   我的最新配置是:
   seata-server -->  application.yml
   ```
   yml
   
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You 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.
   #
   server:
     port: 8091
   spring:
     application:
       name: seata-server
     main:
       web-application-type: none
   logging:
     config: classpath:logback-spring.xml
     file:
       path: ${log.home:${user.home}/logs/seata}
     extend:
       logstash-appender:
         # off by default
         enabled: false
         destination: 127.0.0.1:4560
       kafka-appender:
         # off by default
         enabled: false
         bootstrap-servers: 127.0.0.1:9092
         topic: logback_to_logstash
         producer:
           acks: 0
           linger-ms: 1000
           max-block-ms: 0
       metric-appender:
         # off by default
         enabled: false
   
   console:
     user:
       username: seata
       password: seata
   
   seata:
     config:
       # support: nacos, consul, apollo, zk, etcd3
       type: nacos
       nacos:
         server-addr: 你的 nacos 地址
         data-id: seata-server.properties
         group: DEFAULT_GROUP # nacos seata-server.properties 的所属组
         namespace: "" # nacos seata-server.properties 的命名空间
         username: nacos # 你的 nacos 账号
         password: nacos # 你的 nacos 密码
     registry:
       # support: nacos, eureka, redis, zk, consul, etcd3, sofa
       type: nacos
       nacos:
         server-addr: 
         application: seata-server
         group: DEFAULT_GROUP
         namespace: 
         # tc集群名称
         cluster: default
         username: nacos
         password: nacos
   
     security:
       secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
       tokenValidityInMilliseconds: 1800000
       ignore:
         urls: 
/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
   
   
   ```
   seata-server.properties 配置直接拿 github 上的,配置好数据库等等即可
   
[https://github.com/apache/incubator-seata/blob/2.7.0/script/config-center/config.txt](url)
   
   数据库 seata sql 脚本同上
   
[https://github.com/apache/incubator-seata/blob/2.7.0/script/server/db/mysql.sql](url)
   
   最后奉上 docker-compose.yml 脚本
   ```
   yml
   
   services:
     # Seata 事务协调器服务
     seata-server:
       image: apache/seata-server:2.7.0
       container_name: seata
       ports:
         - "8091:8091"          # Seata 事务协调器端口
       environment:
         - JVM_XMX=1024m
         - JVM_XMS=512m
         - SEATA_IP=192.168.1.243 # 宿主机服务实例IP
         - SEATA_PORT=8091
       volumes:
         - /devtools/seata/resources:/seata-server/resources
         - /devtools/seata/libs:/seata-server/libs
         - /devtools/seata/logs:/root/logs
       networks:
         - seata-network
       restart: always
       depends_on:
         - seata-namingserver
   
     # Seata 控制台服务(Namingserver)
     seata-namingserver:
       image: apache/seata-naming-server
       container_name: seata-naming-server
       hostname: seata-namingserver
       ports:
         - "8081:8081"          # 控制台访问端口(浏览器访问这个端口)
         - "10055:10055"        # 内部通信端口(保持默认)
       environment:
         - SERVER_PORT=8081
         - SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ=
         - SEATA_SECURITY_TOKEN_VALIDITY=1800000
       volumes:
         - /devtools/seata/console/resources:/seata-naming-server/resources
       networks:
         - seata-network
       restart: always
   
   networks:
     seata-network:
       driver: bridge
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to