【Docker】快速部署 Apache Seata:开源的分布式事务解决方案
引言
Seata 是一个开源的分布式事务解决方案,旨在提供高性能和易于使用的分布式事务服务。它支持多种事务模式,包括 AT(自动事务)、TCC(Try-Confirm-Cancel)、SAGA 和 XA。Seata 主要用于解决微服务架构下的分布式事务问题,确保数据的一致性和完整性。
仓库地址
- https://github.com/apache/incubator-seata
- https://hub.docker.com/r/seataio/seata-server
步骤
-
拉取镜像
docker pull seataio/seata-server
-
运行容器
将 SEATA_IP 设为宿主机地址。如果在 Docker 容器中运行,不应该设为 localhost,否则容器外无法访问。
docker run -d \ --name seata \ -p 8099:8099 \ -p 7099:7099 \ -e SEATA_IP=172.30.173.62 \ -v ./seata:/seata-server/resources \ --privileged=true \ seataio/seata-server
-
访问
http://localhost:7099/
-
登录管理面板
用户:admin
密码:admin