mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(system) Supply local IP to service discovery if multiFace is enabled
This commit is contained in:
parent
b1f970152d
commit
1118657ffd
@ -72,6 +72,17 @@ public class ServiceConfigurationModule extends AbstractModule {
|
|||||||
return configuredValue;
|
return configuredValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Boolean.getBoolean("system.multiFace")) {
|
||||||
|
try {
|
||||||
|
String localNetworkIp = getLocalNetworkIP();
|
||||||
|
if (null != localNetworkIp) {
|
||||||
|
return localNetworkIp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
logger.warn("Failed to get local network IP", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
// If we're in docker, we'll use the hostname
|
// If we're in docker, we'll use the hostname
|
||||||
if (Boolean.getBoolean("service.useDockerHostname")) {
|
if (Boolean.getBoolean("service.useDockerHostname")) {
|
||||||
return System.getenv("HOSTNAME");
|
return System.getenv("HOSTNAME");
|
||||||
|
Loading…
Reference in New Issue
Block a user