You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.3 KiB
YAML

version: '3.4'
services:
# Dapr Actor 服务
placement:
container_name: placement
hostname: placement
image: "daprio/dapr:1.9.5"
restart: always
command: ["./placement", "-port", "6050"]
networks:
- fy
# Dapr zipkin 检测
zipkin:
container_name: zipkin
hostname: zipkin
image: "openzipkin/zipkin:2.23.19"
restart: always
ports:
- "9411:9411"
networks:
- fy
gateway:
# container_name: gateway
image: "gateway:latest"
restart: always
# 端口映射
ports:
- "5330:5330"
# 应用启动时的地址
environment:
- "ASPNETCORE_URLS=http://*:5330;"
depends_on:
- placement
- zipkin
networks:
- fy
- mq
- cache
- db
gateway-dapr:
image: "daprio/daprd:1.9.5"
# restart: always
command: [ "./daprd", "-app-id", "gateway",
# 应用端口号
"-app-port", "5330" ,
"-dapr-http-port","6330",
"-placement-host-address","placement:6050",
# dapr 配置文件
"-config","/Dapr/config.yaml",
# dapr 组件
"-components-path", "/Dapr/Components"]
depends_on:
- gateway
# 数据持久化 - [卷标名称]:/var/lib/mysql 或者 - [直接使用宿主机的本地路径]:/var/lib/mysql
volumes:
- "../Dapr:/Dapr"
# 工作模型:绑定边车匹配的应用服务名
network_mode: "service:gateway"
lansheng:
image: "lansheng:latest"
restart: always
# 端口映射
ports:
- "9001:9001"
networks:
- fy
- mq
- cache
- db
lansheng-dapr:
image: "daprio/daprd:1.9.5"
restart: always
command: [ "./daprd", "-app-id", "lansheng",
# 应用端口号
"-app-port", "80" ,
"-placement-host-address","placement:6050",
# dapr 配置文件
"-config","/Dapr/config.yaml",
# dapr 组件
"-components-path", "/Dapr/Components"]
# 数据持久化 - [卷标名称]:/var/lib/mysql 或者 - [直接使用宿主机的本地路径]:/var/lib/mysql
depends_on:
- lansheng
volumes:
- "../Dapr:/Dapr"
# 工作模型:绑定边车匹配的应用服务名
network_mode: "service:lansheng"
networks:
fy:
db:
external: true
mq:
external: true
cache:
external: true