Browse Source

Improved BASE_URL localhost initial text

pull/7878/head
Volodymyr Babak 4 years ago
parent
commit
b87b74a27e
  1. 2
      application/src/main/data/json/edge/install_instructions/docker/localhost_warning.md
  2. 2
      application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeInstallService.java

2
application/src/main/data/json/edge/install_instructions/docker/localhost_warning.md

@ -1,3 +1,3 @@
###### WARNING NOTE: 'localhost' can not be used as CLOUD_RPC_HOST
Please note that your ThingsBoard base URL is **'localhost'** at the moment. **'localhost'** cannot be used for docker containers - please update **CLOUD_RPC_HOST** environment variable below to the IP address of your machine (*docker **host** machine*). IP address must be **192.168.1.XX** or similar format. In other case - ThingsBoard Edge service, that is running in docker container, will not be able to connect to the cloud.
Please note that your ThingsBoard base URL is **'localhost'** at the moment. **'localhost'** cannot be used for docker containers - please update **CLOUD_RPC_HOST** environment variable below to the IP address of your machine (*docker **host** machine*). IP address must be `192.168.1.XX` or similar format. In other case - ThingsBoard Edge service, that is running in docker container, will not be able to connect to the cloud.

2
application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeInstallService.java

@ -52,7 +52,7 @@ public class DefaultEdgeInstallService implements EdgeInstallService {
if (baseUrl.contains("localhost") || baseUrl.contains("127.0.0.1")) {
String localhostWarning = readFile(resolveFile("docker", "localhost_warning.md"));
dockerInstallInstructions = dockerInstallInstructions.replace("${LOCALHOST_WARNING}", localhostWarning);
dockerInstallInstructions = dockerInstallInstructions.replace("${BASE_URL}", "!!!PLEASE_REPLACE_ME!!!");
dockerInstallInstructions = dockerInstallInstructions.replace("${BASE_URL}", "!!!REPLACE_ME_TO_HOST_IP_ADDRESS!!!");
} else {
dockerInstallInstructions = dockerInstallInstructions.replace("${LOCALHOST_WARNING}", "");
dockerInstallInstructions = dockerInstallInstructions.replace("${BASE_URL}", baseUrl);

Loading…
Cancel
Save