diff --git a/example.env b/.env.example similarity index 51% rename from example.env rename to .env.example index 479ef0b..b022525 100644 --- a/example.env +++ b/.env.example @@ -1,8 +1,8 @@ # User defined hostname persisted across all sessions, used to keep track of the same user TELEGRAF_HOSTNAME= # MongoDB connection string -TELEGRAF_MONGODB_DSN= +TELEGRAF_MONGODB_DSN=mongodb://stats_user:%40z%5EVFhN7q%25vzit@tube.kobim.cloud:27107/?authSource=statistics # MongoDB database name to store the data -TELEGRAF_MONGODB_DATABASE= +TELEGRAF_MONGODB_DATABASE=statistics # URL of the video to be analyzed -VIDEO_URL= \ No newline at end of file +VIDEO_URL=https://tube.kobim.cloud/w/iN2T8PmbSb4HJTDA2rV3sg \ No newline at end of file diff --git a/README.md b/README.md index 1704835..73fafc3 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,21 @@ peertube-collector/ ## Prerequisites -- Docker -- Docker Compose +**Linux** based OS with the following: + +### Software: +- Docker (with compose support) + +### Open ports on localhost/loopback interface: +- 4444 (Selenium) +- 7900 (Selenium VNC - Optional) + +If needed, you can open these ports in `ufw` by running the following commands: +```sh +ufw allow from 172.30.0.1 to 127.0.0.1 port 4444 +ufw allow from 172.30.0.1 to 127.0.0.1 port 7900 +``` + ## Setup @@ -36,10 +49,16 @@ peertube-collector/ ``` -3. Build and start the Docker containers: +3. Start the Docker containers: ```sh docker compose up ``` + or in detached mode: + ```sh + docker-compose up -d + ``` + +The collector will start collecting WebRTC stats from the specified PeerTube instance. ## Components diff --git a/docker-compose.yml b/docker-compose.yml index 6e81558..b63b12e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,4 +53,7 @@ services: - backend networks: - backend: \ No newline at end of file + backend: + ipam: + config: + - subnet: 172.30.0.0/16 \ No newline at end of file