mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: show warning log on startup if openvidu-dev container
parent
ec6106b079
commit
7e5a8afb48
|
@ -9,5 +9,5 @@ command=/bin/bash /kms.sh
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
|
||||||
[program:openvidu-server]
|
[program:openvidu-server]
|
||||||
command=/bin/bash -c "java -jar -Dspring.config.additional-location=classpath:/application-container.properties /openvidu-server.jar"
|
command=/bin/bash -c "java -jar -Dspring.config.additional-location=classpath:/application-container.properties -DOPENVIDU_DEV=true /openvidu-server.jar"
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
|
|
@ -366,6 +366,13 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
||||||
+ "----------------------------------------------------\n";
|
+ "----------------------------------------------------\n";
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
|
if (config.isOpenViduDev()) {
|
||||||
|
// @formatter:off
|
||||||
|
msg += "\n\n WARNING!! THIS OPENVIDU DEPLOYMENT IS NOT SUITABLE FOR PRODUCTION ENVIRONMENTS\n"
|
||||||
|
+ " To deploy in production visit https://docs.openvidu.io/en/stable/deployment\n\n";
|
||||||
|
// @formatter:on
|
||||||
|
}
|
||||||
|
|
||||||
log.info(msg);
|
log.info(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,8 @@ public class OpenviduConfig {
|
||||||
|
|
||||||
private String dotenvPath;
|
private String dotenvPath;
|
||||||
|
|
||||||
|
private boolean openviduDev = false;
|
||||||
|
|
||||||
// Media Nodes private IPs and Public IPs
|
// Media Nodes private IPs and Public IPs
|
||||||
// If defined, they will be configured as public IPs of Kurento or Mediasoup
|
// If defined, they will be configured as public IPs of Kurento or Mediasoup
|
||||||
// Key: Private IP
|
// Key: Private IP
|
||||||
|
@ -445,6 +447,10 @@ public class OpenviduConfig {
|
||||||
return secret.equals(this.getOpenViduSecret());
|
return secret.equals(this.getOpenViduSecret());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOpenViduDev() {
|
||||||
|
return this.openviduDev;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean openviduRecordingCustomLayoutChanged(String path) {
|
public boolean openviduRecordingCustomLayoutChanged(String path) {
|
||||||
return !"/opt/openvidu/custom-layout".equals(path);
|
return !"/opt/openvidu/custom-layout".equals(path);
|
||||||
}
|
}
|
||||||
|
@ -634,6 +640,10 @@ public class OpenviduConfig {
|
||||||
|
|
||||||
webrtcIceServersBuilders = loadWebrtcIceServers("OPENVIDU_WEBRTC_ICE_SERVERS");
|
webrtcIceServersBuilders = loadWebrtcIceServers("OPENVIDU_WEBRTC_ICE_SERVERS");
|
||||||
|
|
||||||
|
Boolean openviduDevAux = asOptionalBoolean("OPENVIDU_DEV");
|
||||||
|
if (openviduDevAux != null) {
|
||||||
|
openviduDev = openviduDevAux;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkCertificateType() {
|
private void checkCertificateType() {
|
||||||
|
@ -877,6 +887,15 @@ public class OpenviduConfig {
|
||||||
return getValue(property);
|
return getValue(property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Boolean asOptionalBoolean(String property) {
|
||||||
|
Boolean value = null;
|
||||||
|
String strValue = this.getValue(property, false);
|
||||||
|
if (strValue != null) {
|
||||||
|
value = Boolean.parseBoolean(strValue);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
protected String asOptionalStringAndNullIfBlank(String property) {
|
protected String asOptionalStringAndNullIfBlank(String property) {
|
||||||
String value = getValue(property);
|
String value = getValue(property);
|
||||||
if (value != null && value.isBlank()) {
|
if (value != null && value.isBlank()) {
|
||||||
|
|
Loading…
Reference in New Issue