Show error when domain/ip or secret are not set
This commit is contained in:
parent
19e76d05da
commit
19ac689e9c
@ -2,11 +2,11 @@
|
||||
# ----------------------
|
||||
# Documentation: https://openvidu.io/docs/reference-docs/openvidu-server-params/
|
||||
|
||||
# OpenVidu SECRET used for apps and to access to the inspector. Change it.
|
||||
OPENVIDU_SECRET=MY_SECRET
|
||||
# OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard
|
||||
OPENVIDU_SECRET=
|
||||
|
||||
# Domain name. If you do not have one, the public IP of the machine.
|
||||
DOMAIN_OR_PUBLIC_IP=openvidu.example.com
|
||||
# Domain name. If you do not have one, the public IP of the machine. For example 212.4.34.1 or openvidu.example.com.
|
||||
OPENVIDU_DOMAIN_OR_PUBLIC_IP=
|
||||
|
||||
# Openvidu Folder Record used for save the openvidu recording videos. Change it
|
||||
# with the folder you want to use from your host.
|
||||
|
||||
@ -10,5 +10,5 @@ services:
|
||||
ports:
|
||||
- "5442:80"
|
||||
environment:
|
||||
- OPENVIDU_URL=https://${DOMAIN_OR_PUBLIC_IP}
|
||||
- OPENVIDU_URL=https://${OPENVIDU_DOMAIN_OR_PUBLIC_IP}
|
||||
- OPENVIDU_SECRET=${OPENVIDU_SECRET}
|
||||
|
||||
@ -11,15 +11,17 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ${OPENVIDU_RECORDING_FOLDER}:${OPENVIDU_RECORDING_FOLDER}
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- SERVER_SSL_ENABLED=false
|
||||
- SERVER_PORT=5443
|
||||
- OPENVIDU_PUBLICURL=https://${DOMAIN_OR_PUBLIC_IP}
|
||||
- OPENVIDU_SECRET=${OPENVIDU_SECRET}
|
||||
- OPENVIDU_PUBLICURL=
|
||||
- OPENVIDU_RECORDING=true
|
||||
- OPENVIDU_RECORDING_PATH=${OPENVIDU_RECORDING_FOLDER}
|
||||
- KMS_URIS="[\"ws://127.0.0.1:8888/kurento\"]"
|
||||
- COTURN_IP=${DOMAIN_OR_PUBLIC_IP}
|
||||
- COTURN_IP=${OPENVIDU_DOMAIN_OR_PUBLIC_IP}
|
||||
- COTURN_REDIS_IP=127.0.0.1
|
||||
- LOGGING_LEVEL_ROOT=${OV_CE_DEBUG_LEVEL:-INFO}
|
||||
|
||||
@ -58,6 +60,6 @@ services:
|
||||
- ./certificates:/etc/letsencrypt
|
||||
- ./owncert:/owncert
|
||||
environment:
|
||||
- DOMAIN_OR_PUBLIC_IP=${DOMAIN_OR_PUBLIC_IP}
|
||||
- DOMAIN_OR_PUBLIC_IP=${OPENVIDU_DOMAIN_OR_PUBLIC_IP}
|
||||
- CERTIFICATE_TYPE=${CERTIFICATE_TYPE}
|
||||
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||
|
||||
@ -148,9 +148,11 @@ When OpenVidu Platform is ready you will see this message:
|
||||
----------------------------------------------------
|
||||
```
|
||||
|
||||
In case OpenVidu sever founds any problem, it will be shown instead of this message.
|
||||
|
||||
You can press `Ctrl+C` to come back to the shell.
|
||||
|
||||
Then you can open OpenVidu Dashboard to verify if videoconference is working as expected. The user is `OPENVIDUAPP` and the password what you have configured in `.env` file.
|
||||
If all is ok, you can open OpenVidu Dashboard to verify if videoconference is working as expected. The user is `OPENVIDUAPP` and the password what you have configured in `.env` file.
|
||||
|
||||
If videoconference application is started, it is available in https://server/
|
||||
|
||||
@ -163,7 +165,7 @@ To stop the application exec this command:
|
||||
### Change configuration
|
||||
|
||||
To change the configuration follow this steps:
|
||||
* Stop the services: `$ docker-compose stop`
|
||||
* Reset the services: `$ docker-compose down`
|
||||
* Change configuration in `.env` file
|
||||
* Start the services: `$ docker-compose up -d`
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ import org.kurento.jsonrpc.server.JsonRpcConfigurer;
|
||||
import org.kurento.jsonrpc.server.JsonRpcHandlerRegistry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
@ -82,6 +83,9 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
||||
public static String publicurlType;
|
||||
public static String wsUrl;
|
||||
public static String httpUrl;
|
||||
|
||||
@Autowired
|
||||
OpenviduConfig config;
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ -217,23 +221,61 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
||||
|
||||
@EventListener(ApplicationReadyEvent.class)
|
||||
public void whenReady() {
|
||||
log.info("OpenVidu Server listening for client websocket connections on"
|
||||
+ (OpenViduServer.publicurlType.isEmpty() ? "" : (" " + OpenViduServer.publicurlType)) + " url "
|
||||
+ OpenViduServer.wsUrl + WS_PATH);
|
||||
|
||||
String dashboardUrl = httpUrl+"dashboard/";
|
||||
String startMessage;
|
||||
|
||||
if(!config.getConfErrors().isEmpty()) {
|
||||
|
||||
// @formatter:off
|
||||
startMessage =
|
||||
"\n\n----------------------------------------------------\n" +
|
||||
"\n"+
|
||||
" Configuration errors\n" +
|
||||
" --------------------\n" +
|
||||
"\n";
|
||||
|
||||
for(String msg : config.getConfErrors()) {
|
||||
startMessage += " * "+ msg + "\n";
|
||||
}
|
||||
|
||||
startMessage += "\n"+
|
||||
"\n"+
|
||||
" Instructions\n" +
|
||||
" ------------\n" +
|
||||
"\n"+
|
||||
" 1) Stop OpenVidu services with command:\n" +
|
||||
"\n"+
|
||||
" $ docker-compose down\n"+
|
||||
"\n"+
|
||||
" 2) Fix configuration errors in .env file.\n" +
|
||||
"\n"+
|
||||
" 3) Start OpenVidu services with command:\n"+
|
||||
"\n"+
|
||||
" $ docker-compose up -d\n"+
|
||||
"\n"+
|
||||
"----------------------------------------------------\n";
|
||||
// @formatter:on
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
String dashboardUrl = httpUrl+"dashboard/";
|
||||
|
||||
// @formatter:off
|
||||
startMessage =
|
||||
"\n\n----------------------------------------------------\n" +
|
||||
"\n"+
|
||||
" OpenVidu Platform is ready!\n" +
|
||||
" ---------------------------\n" +
|
||||
"\n"+
|
||||
" * OpenVidu Server: " + httpUrl + "\n"+
|
||||
"\n"+
|
||||
" * OpenVidu Dashboard: " + dashboardUrl + "\n"+
|
||||
"\n"+
|
||||
"----------------------------------------------------\n";
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
String startMessage =
|
||||
"\n\n----------------------------------------------------\n" +
|
||||
"\n"+
|
||||
" OpenVidu Platform is ready!\n" +
|
||||
" ---------------------------\n" +
|
||||
"\n"+
|
||||
" * OpenVidu Server: " + httpUrl + "\n"+
|
||||
"\n"+
|
||||
" * OpenVidu Dashboard: " + dashboardUrl + "\n"+
|
||||
"\n"+
|
||||
"----------------------------------------------------\n";
|
||||
log.info(startMessage);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user