|
|
|
@ -16,6 +16,7 @@ |
|
|
|
package org.thingsboard.server.msa; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.testcontainers.DockerClientFactory; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
@ -41,7 +42,9 @@ public class TestProperties { |
|
|
|
|
|
|
|
public static String getBaseUiUrl() { |
|
|
|
if (instance.isActive()) { |
|
|
|
return "https://host.docker.internal"; |
|
|
|
//return "https://host.docker.internal" // this alternative requires docker-selenium.yml extra_hosts: - "host.docker.internal:host-gateway"
|
|
|
|
//return "https://" + DockerClientFactory.instance().dockerHostIpAddress(); //this alternative will get Docker IP from testcontainers
|
|
|
|
return "https://haproxy"; //communicate inside current docker-compose network to the load balancer container
|
|
|
|
} |
|
|
|
return getProperties().getProperty("tb.baseUiUrl"); |
|
|
|
} |
|
|
|
|