我正在为 Amazon ECS 容器部署一个快速网关,我试图找出如果 gateway.config.yml 覆盖 serviceEndpoint 部分的最佳方法,因为服务 URL 明显不同。
我需要改变这个
serviceEndpoints:
user:
url: 'http://localhost:3001'
auth:
url: 'http://localhost:3004'
customer:
url: 'http://localhost:3002'
对此:
serviceEndpoints:
user:
url: 'http://user.service:3001'
auth:
url: 'http://auth.service:3004'
customer:
url: 'http://customer.sevice:3002'
等等。
我假设我可以维护 2 个配置文件的副本并在 Docker 构建中交换它们,但我认为这不是最好的选择,我认为实现服务发现将是另一种选择。
有任何想法吗?
蒂亚!