Skip to content

Commit 4c9f633

Browse files
committed
Deploy guide updated
1 parent 12dbaf5 commit 4c9f633

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ Note that this roadmap may change throughout development.
3131

3232
## Development & Installation ##
3333

34-
For information on how to get the the app working [CLICK HERE](/documentation/installation.md)
34+
For information on how to get the the app working [CLICK HERE](/documentation/deploy.md)
3535
For information on how to develop the app [CLICK HERE](/documentation/development.md)
3636

docker/composed/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
openvidu-teaching:
1313
image: diegomzmn/openviduteaching:latest
1414
volumes:
15-
- C:\Users\diego\OneDrive\Documentos\GitHub\2019-OpenViduTeaching\backend\src\main\resources\json\initialData.json:/initialData.json
15+
- /path/to/initialData.json:/initialData.json
1616
ports:
1717
- "8080:8080"
1818
environment:

docker/dockerTeaching.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
docker kill openviduteaching
2-
docker run --name openviduteaching -p 8080:8080 -e openvidu.url="https://192.168.1.38:4443/" -e initialDataFile="/initialData.json" -v %cd%\build\initialData.json:/initialData.json --rm diegomzmn/openviduteaching
2+
docker run --name openviduteaching -p 8080:8080 -e openvidu.url="https://192.168.1.38:4443/" -e openvidu.secret=MY_SECRET -e initialDataFile="/initialData.json" -v %cd%\build\initialData.json:/initialData.json --rm diegomzmn/openviduteaching

documentation/deploy.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,11 @@ You have three options for deploying the app:
33

44
### OpenViduTeaching standalone Docker container ###
55

6-
You only need [Docker CE](https://hub.docker.com/search?type=edition&offering=community) and the standalone container:
7-
`docker run --name openviduteaching -p 4443:4443 -p 8080:8080 --rm -e openvidu.secret=MY_SECRET diegomzmn/openviduteaching-standalone`
6+
* You only need [Docker CE](https://hub.docker.com/search?type=edition&offering=community) and the standalone container: `docker run -p 4443:4443 -p 8080:8080 -e openvidu.secret=MY_SECRET -e initialDataFile="/initialData.json" -v /path/to/initialData.json:/initialData.json --rm diegomzmn/openviduteaching-standalone`
87

9-
**TODO**
8+
* You can choose your secret however you like. Check the [OpenVidu tutorials](https://openvidu.io/docs/tutorials/) for more info.
109

11-
### JAR + Openvidu+KMS Docker container ###
12-
13-
* You need to have the OpenVidu server running. For that you can use the Docker container that wraps the openvidu-server and Kurento Media Server:
14-
`docker run -p 4443:4443 --rm -e openvidu.secret=MY_SECRET openvidu/openvidu-server-kms:2.11.0`
15-
You can choose your port and secret however you like.
16-
Check the [OpenVidu tutorials](https://openvidu.io/docs/tutorials/) for more info.
17-
18-
* Get the jar file for the latest release from the [GitHub repository](https://github.com/codeurjc-students/2019-OpenViduTeaching).
19-
20-
* Data is initialized from a json file. You will have to add the absolute path to it as an argument for the jar file (otherwise it will use the [default file](https://github.com/codeurjc-students/2019-OpenViduTeaching/blob/master/backend/src/main/resources/json/initialData.json))
10+
* Data is initialized from a json file. You will have to mount the file into the container and add and enviroment variable with the absolute path to where it was mounted (otherwise it will use the [default file](https://github.com/codeurjc-students/2019-OpenViduTeaching/blob/master/backend/src/main/resources/json/initialData.json)). In the example above we mount it to `/initialData.json` and add `-e initialDataFile="/initialData.json"`.
2111
Here is an example of a valid json for the initial rooms and users:
2212
~~~~ json
2313
{
@@ -55,17 +45,25 @@ You only need [Docker CE](https://hub.docker.com/search?type=edition&offering=co
5545
]
5646
}
5747
~~~~
58-
As you can see, the moddedRooms, presentedRooms and participatedRooms properties are optional.
48+
As you can see, the moddedRooms, presentedRooms and participatedRooms properties are optional. A user can have a different role for each room, so each user can have none, one or multiple rooms of each type in the json.
49+
5950

60-
* You also have to set the OpenVidu server url and secret when executing the jar (the following values are the default ones for those two arguments):
61-
`java -jar OpenViduTeaching-1.0.0.jar --initialDataFile="/fakepath/initialData.json" --openvidu.url="https://localhost:4443/" --openvidu.secret="MY_SECRET"`
51+
### JAR + Openvidu+KMS Docker container ###
52+
53+
* You need to have the OpenVidu server running. For that you can use the Docker container that wraps the openvidu-server and Kurento Media Server:
54+
`docker run -p 4443:4443 --rm -e openvidu.secret=MY_SECRET openvidu/openvidu-server-kms:2.11.0`
55+
56+
* Get the jar file for the latest release from the [GitHub repository](https://github.com/codeurjc-students/2019-OpenViduTeaching).
57+
58+
* You may also set the OpenVidu server url and secret when executing the jar (the following values are the default ones for those two arguments):
59+
`java -jar OpenViduTeaching-1.0.0.jar --initialDataFile="/path/to/initialData.json" --openvidu.url="https://localhost:4443/" --openvidu.secret="MY_SECRET"`
6260
For additional customizable values take a look at the [application.properties file](https://github.com/codeurjc-students/2019-OpenViduTeaching/blob/master/backend/src/main/resources/application.properties).
6361

6462

6563
### OpenViduTeaching Docker container + Openvidu+KMS Docker container ###
6664

67-
* Firstly get the openvidu-server + KMS container running (same as in the previous section).
68-
69-
* Then, get the OpenViduTeaching running:
65+
* You can simply make a docker-compose.yml. Take [this one](https://github.com/codeurjc-students/2019-OpenViduTeaching/blob/master/docker/composed/docker-compose.yml) as an example. You have to set the ports as specified (you can change 8080 in openvidu-teaching), mount the volume and use an enviroment variable for the path (same as in first option). You MUST use the variable for the url (localhost will not work).
7066

71-
**TODO**
67+
* You can also start both manually. Here's how you run both independently with the same configuration as in the compose example.
68+
`docker run -p 4443:4443 --rm -e openvidu.secret=SECRET openvidu/openvidu-server-kms:2.11.0`
69+
`docker run -p 8080:8080 -e openvidu.url="https://192.168.1.38:4443/" -e openvidu.secret=SECRET -e initialDataFile="/initialData.json" -v /path/to/initialData.json:/initialData.json --rm diegomzmn/openviduteaching`

documentation/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ You will need both the OpenVidu server and OpenViduTeaching server.
99
~~~~ shell
1010
docker run -p 4443:4443 --rm -e openvidu.secret=MY_SECRET openvidu/openvidu-server-kms:2.11.0
1111
~~~~
12-
You can choose your port and secret however you like.
12+
You can choose the secret however you like.
1313
Check the [OpenVidu tutorials](https://openvidu.io/docs/tutorials/) for more info.
1414

1515
* The OpenViduTeaching backend uses Spring Boot v2.1.9. To start developing open the "backend" folder with the IDE of your choice as a Spring Boot project.
1616
The database is H2, so you don't need to download anything else for that.
1717
The first users and rooms are initialized from the file initialData.json located in resources/json.
18-
You may change your OpenVidu url and secret in the application.properties file inside the resources folder.
18+
You may change your OpenVidu url and secret in the application.properties file inside the resources folder (if you change the port you must change it in the frontend and OpenVidu server too).
1919
To start the server:
2020
~~~~ shell
2121
cd backend

0 commit comments

Comments
 (0)