将dispatch.yaml添加到每个服务中。

huangapple go评论88阅读模式
英文:

Add dispatch.yaml to each of the services?

问题

我在 GAP 中运行了几个服务,并且我必须为每个服务分配一个特定的子域,这是通过 dispatch.yaml 文件完成的。到目前为止,一切都很顺利,我的问题是:只在单个服务中定义 dispatch.yaml 文件是否足够,还是我必须为每个服务都这样做呢?

英文:

I am running a couple of services in GAP and I have to assign each service a specific subdomain, which is done from the dispatch.yaml file. So far so good, my query is: Is it enough to define the dispatch.yaml file in a single service or do I have to do it for each one?

答案1

得分: 0

你可以使用单个 dispatch.yaml 文件将所有服务分配给特定的子域名:

- url: "subdomain1.domain.com/*"
  service: service1

- url: "subdomain2.domain.com/*"
  service: service2

- url: "subdomain3.domain.com/*"
  service: service3

#以此类推
英文:

You can assign all services to specific subdomains using a single dispatch.yaml file:

- url: "subdomain1.domain.com/*"
  service: service1

- url: "subdomain2.domain.com/*"
  service: service2

- url: "subdomain3.domain.com/*"
  service: service3

#And so on

huangapple
  • 本文由 发表于 2020年8月31日 08:20:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/63663338.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定