Fix URL compilation for AppMgr confupdate which expects only host
This commit is contained in:
parent
765f34f3f4
commit
ae70b53074
@ -256,7 +256,7 @@ class AppMgr:
|
|||||||
|
|
||||||
def update_apps_urls(self):
|
def update_apps_urls(self):
|
||||||
# Update configuration for respective applications
|
# Update configuration for respective applications
|
||||||
confupdater.update_url(tools.compile_url(self.domain, self.port))
|
confupdater.update_url(tools.compile_url(self.domain, self.port, None))
|
||||||
# Restart currently running apps in order to update config and re-register nginx proxy
|
# Restart currently running apps in order to update config and re-register nginx proxy
|
||||||
for app in self.conf['apps']:
|
for app in self.conf['apps']:
|
||||||
if tools.is_service_started(app):
|
if tools.is_service_started(app):
|
||||||
|
@ -13,7 +13,8 @@ NULL_IP = '[100::1]'
|
|||||||
|
|
||||||
def compile_url(domain, port, proto='https'):
|
def compile_url(domain, port, proto='https'):
|
||||||
port = ':{}'.format(port) if (proto == 'https' and port != '443') or (proto == 'http' and port != '80') else ''
|
port = ':{}'.format(port) if (proto == 'https' and port != '443') or (proto == 'http' and port != '80') else ''
|
||||||
return '{}://{}{}'.format(proto, domain, port)
|
host = '{}{}'.format(domain, port)
|
||||||
|
return '{}://{}'.format(proto, host) if proto is not None else host
|
||||||
|
|
||||||
def get_container_ip(app):
|
def get_container_ip(app):
|
||||||
# Return an IP address of a container. If the container is not running, return address from IPv6 discard prefix instead
|
# Return an IP address of a container. If the container is not running, return address from IPv6 discard prefix instead
|
||||||
|
Loading…
Reference in New Issue
Block a user