Rename docker-compose services

pull/431/head
micaelgallego 2020-03-29 01:10:10 +01:00
parent 35e4bf0eb7
commit 19e76d05da
2 changed files with 52 additions and 26 deletions

View File

@ -6,7 +6,6 @@ services:
# the .env file with the necessaries variables. # the .env file with the necessaries variables.
openvidu-server: openvidu-server:
image: openvidu/openvidu-server:2.13.0-beta1 image: openvidu/openvidu-server:2.13.0-beta1
entrypoint: ["java", "-jar", "/openvidu-server.jar"]
restart: on-failure restart: on-failure
network_mode: host network_mode: host
volumes: volumes:
@ -34,12 +33,12 @@ services:
- KMS_MAX_PORT=57000 - KMS_MAX_PORT=57000
- GST_DEBUG=${KMS_DEBUG_LEVEL:-3,Kurento*:4,kms*:4,sdp*:4,webrtc*:4,*rtpendpoint:4,rtp*handler:4,rtpsynchronizer:4,agnosticbin:4} - GST_DEBUG=${KMS_DEBUG_LEVEL:-3,Kurento*:4,kms*:4,sdp*:4,webrtc*:4,*rtpendpoint:4,rtp*handler:4,rtpsynchronizer:4,agnosticbin:4}
redis-db: redis:
image: redis:5.0.7 image: redis:5.0.7
restart: on-failure restart: on-failure
network_mode: host network_mode: host
openvidu-coturn: coturn:
image: openvidu/openvidu-coturn:1.0.0-beta1 image: openvidu/openvidu-coturn:1.0.0-beta1
restart: on-failure restart: on-failure
network_mode: host network_mode: host
@ -51,7 +50,7 @@ services:
- MIN_PORT=57001 - MIN_PORT=57001
- MAX_PORT=65535 - MAX_PORT=65535
openvidu-proxy: nginx:
image: openvidu/openvidu-proxy:1.0.0-beta1 image: openvidu/openvidu-proxy:1.0.0-beta1
restart: on-failure restart: on-failure
network_mode: host network_mode: host

View File

@ -7,13 +7,11 @@ This document describes how to deploy OpenVidu CE alongside OpenVidu Call (a bas
Services installed following these instructions are: Services installed following these instructions are:
- **OpenVidu Server (openvidu-server)**: This is the brain of OpenVidu platform. The signaling plane. - **OpenVidu Server (openvidu-server)**: This is the brain of OpenVidu platform. The signaling plane.
- **Kurento Media Server (kms)**: This is the hearth of the OpenVidu platform. In charge of media plane. - **Kurento Media Server (kms)**: This is the hearth of the OpenVidu platform. In charge of media plane.
- **TURN Server (openvidu-coturn)**: Service used to allow media communications with browsers in certain networks. - **Coturn (coturn)**: Service used to allow media communications with browsers in certain special networks.
- **Redis (redis-db)**: Database to manage users in TURN server. - **Redis (redis)**: Database to manage users in Coturn server.
- **Nginx (openvidu-proxy)**: A reverse proxy used to configure SSL certificate and to allow both Openvidu Server and the Application in the standard https port (443). - **Nginx (nginx)**: A reverse proxy used to configure SSL certificate and to allow both Openvidu Server and the Application in the standard https port (443).
- **Videoconference Application (app)**: A videoconference application deployed for demo porpouses. This application can be easily unistalled or changed by other application. - **Videoconference Application (app)**: A videoconference application deployed for demo porpouses. This application can be easily unistalled or changed by other application.
> TODO: Change the service names for generic ones: openvidu-coturn > coturn, redis-db > redis, openvidu-proxy > nginx.
## 1. Prerequisites ## 1. Prerequisites
You will need docker and docker-compose installed in your linux distribution. In theory, you can use any modern linux distribution, but we have tested with Ubuntu 18.04. You will need docker and docker-compose installed in your linux distribution. In theory, you can use any modern linux distribution, but we have tested with Ubuntu 18.04.
@ -117,20 +115,44 @@ To download and start the services (OpenVidu platform and the application) you c
`$ docker-compose up -d` `$ docker-compose up -d`
Then, all services will be downloaded (only the first time) and executed. Then, all services will be downloaded (only the first time) and executed.
The services will be started when you see this output in the shell: The services will start its execution when you see this output in the shell:
``` ```
Creating openvidu-docker-compose_openvidu-coturn_1 ... done Creating openvidu-docker-compose_coturn_1 ... done
Creating openvidu-docker-compose_app_1 ... done Creating openvidu-docker-compose_app_1 ... done
Creating openvidu-docker-compose_kms_1 ... done Creating openvidu-docker-compose_kms_1 ... done
Creating openvidu-docker-compose_openvidu-proxy_1 ... done Creating openvidu-docker-compose_nginx_1 ... done
Creating openvidu-docker-compose_redis-db_1 ... done Creating openvidu-docker-compose_redis_1 ... done
Creating openvidu-docker-compose_openvidu-server_1 ... done Creating openvidu-docker-compose_openvidu-server_1 ... done
``` ```
Then you can visit https://<DOMAIN_OR_PUBLIC_IP>/ and the application will appear. If get any error, please retry in a few seconds as it is possible that services are still starting. Then, you should check openvidu-server logs to verify if all is configured and working as expected with the following command:
```
$ docker-compose logs -f openvidu-server
```
When OpenVidu Platform is ready you will see this message:
```
----------------------------------------------------
OpenVidu Platform is ready!
---------------------------
* OpenVidu Server: https://server/
* OpenVidu Dashboard: https://server/dashboard/
----------------------------------------------------
```
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 videoconference application is started, it is available in https://server/
### Stop services ### Stop services
@ -138,9 +160,7 @@ To stop the application exec this command:
`docker-compose stop` `docker-compose stop`
### How to operate the services ### Change configuration
#### Change configuration
To change the configuration follow this steps: To change the configuration follow this steps:
* Stop the services: `$ docker-compose stop` * Stop the services: `$ docker-compose stop`
@ -149,20 +169,27 @@ To change the configuration follow this steps:
> TODO: Review that changing domain name with CERTIFICATE_TYPE=letsencrypt regenerates the certificate. > TODO: Review that changing domain name with CERTIFICATE_TYPE=letsencrypt regenerates the certificate.
### What to do if OpenVidu is not working
#### Show service logs #### Show service logs
If you want to see logs of all services execute this command: Take a look to service logs to see what happen. First, see openvidu-server logs:
`$ docker-compose logs -f`
If you only want to see the logs of a service execute any of the following commands:
``` ```
$ docker-compose logs -f openvidu-server $ docker-compose logs -f openvidu-server
```
Then, you can see all service logs togheter:
`$ docker-compose logs -f`
Or you can inspect one by one the other services:
```
$ docker-compose logs -f kms $ docker-compose logs -f kms
$ docker-compose logs -f openvidu-proxy $ docker-compose logs -f nginx
$ docker-compose logs -f openvidu-coturn $ docker-compose logs -f coturn
$ docker-compose logs -f redis-db $ docker-compose logs -f redis
$ docker-compose logs -f app $ docker-compose logs -f app
``` ```