Skip to content

Commit f1c6bbe

Browse files
committed
Fixed update adapter script
1 parent 3b96a53 commit f1c6bbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

layersbox

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ def update_adapter(config, service_directory, service_name):
540540
:returns: shell return code
541541
"""
542542

543+
print("Updating adapter...")
544+
543545
# a list of all service names to update
544546
servicesToUpdate = []
545547

@@ -561,7 +563,8 @@ def update_adapter(config, service_directory, service_name):
561563
# parse nginx.conf of all services to get a list of all proxied containers
562564
#TODO: make sure to only read URLs after a "proxy_pass"
563565
with open(join(service_directory, service_name, "nginx.conf")) as f:
564-
proxied_servers = [w.replace('http://', '') for w in re.findall('(https?:\/\/[A-Za-z0-9]+)',f.read())]
566+
for w in re.findall('(https?:\/\/[A-Za-z0-9]+)',f.read()):
567+
proxied_servers.append(w.replace('http://', ''))
565568

566569
# now get the IPs of the proxied containers
567570
for proxy in proxied_servers:

0 commit comments

Comments
 (0)