|
@@ -20,10 +20,11 @@ fetcher = etcdlib.Connection(args.etcd_host, args.etcd_port, args.etcd_prefix)
|
20
|
20
|
while True:
|
21
|
21
|
services = []
|
22
|
22
|
domains = fetcher.get_label('com.chameth.vhost')
|
|
23
|
+ protocols = fetcher.get_label('com.chameth.proxy.protocol')
|
23
|
24
|
for container, values in fetcher.get_label('com.chameth.proxy').items():
|
24
|
25
|
networks = fetcher.get_networks(container)
|
25
|
26
|
services.append({
|
26
|
|
- 'protocol': 'http', # TODO: Support HTTPS
|
|
27
|
+ 'protocol': protocols[container] if container in protocols else 'http',
|
27
|
28
|
'vhosts': domains[container].split(','),
|
28
|
29
|
'host': next(iter(networks.values())), # TODO: Pick a bridge sensibly?
|
29
|
30
|
'port': values
|