windows--docker-seata使用file启动
1.搜索seata镜像
### docker search seata-server
2.拉取seata镜像
### docker pull seataio/seata-server:1.5.2
3.初次启动
### docker run -d --name seata-server -p 8091:8091 -p 7091:7091 seataio/seata-server:1.5.2
4.拷贝容器中的配置文件到宿主机
docker exec -it seata-server sh
docker cp seata-serve:/seata-server/resources /User/seata/config
参考application-example.yml 修改application.yml
docker rm -f seata-server
5.application.yml
server:
port: 7091
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${user.home}/logs/seata
extend:
logstash-appender:
destination: 127.0.0.1:4560
kafka-appender:
bootstrap-servers: 127.0.0.1:9092
topic: logback_to_logstash
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: nacos
nacos:
server-addr: 192.168.61.1:8848
namespace:
group: SEATA_GROUP
username: nacos
password: nacos
##if use MSE Nacos with auth, mutex with username/password attribute
#access-key: ""
#secret-key: ""
data-id: seataServer.properties
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
nacos:
application: seata-server
server-addr: 192.168.61.1:8848
group: SEATA_GROUP
namespace:
cluster: default
username:
password:
store:
# support: file 、 db 、 redis
mode: file
session:
mode: file
lock:
mode: file
file:
dir: sessionStore
max-branch-session-size: 16384
max-global-session-size: 512
file-write-buffer-cache-size: 16384
session-reload-read-size: 100
flush-disk-mode: async
# server:
# service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
6.指定ip启动
### docker run -d --name seata-server -p 8091:8091 -p 7091:7091 -v D:\docker\seata\config:/seata-server/resources --network zdd_docker_network --ip 172.18.0.7 seataio/seata-server:1.5.2