docs: update README to include server setup instructions and clarify port requirements
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m19s

This commit is contained in:
2025-02-10 12:45:25 +01:00
parent 76edbf0624
commit 755128a5c7

View File

@@ -10,7 +10,7 @@ peertube-collector is a project designed to collect and analyze WebRTC statistic
- Docker Engine Community version is required. To install Docker CE, follow the official [install instructions](https://docs.docker.com/engine/install/). - Docker Engine Community version is required. To install Docker CE, follow the official [install instructions](https://docs.docker.com/engine/install/).
### Ports: ### Ports:
#### Localhost (REQUIRED): #### Docker to Host:
- 4444 (Selenium) - 4444 (Selenium)
Ports can be opened in the host machine's firewall with: Ports can be opened in the host machine's firewall with:
@@ -31,9 +31,6 @@ Ports can be opened in the host machine's firewall with:
ufw allow 50000:60000/udp ufw allow 50000:60000/udp
ufw allow 27107/tcp ufw allow 27107/tcp
``` ```
---
## Setup ## Setup
1. Clone the repository: 1. Clone the repository:
@@ -58,10 +55,10 @@ ufw allow 27107/tcp
docker compose up -d docker compose up -d
``` ```
To stop the Docker containers run: `docker compose down -v`
The collector will start gathering WebRTC stats from the Selenium container and sending them to the Telegraf service. The collector will start gathering WebRTC stats from the Selenium container and sending them to the Telegraf service.
To stop the Docker containers run: `docker compose down -v`
### Monitoring ### Monitoring
A noVNC server is available at [http://localhost:7900](http://localhost:7900/?autoconnect=1&resize=scale&password=secret) to monitor the Selenium container. The password is `secret`. A noVNC server is available at [http://localhost:7900](http://localhost:7900/?autoconnect=1&resize=scale&password=secret) to monitor the Selenium container. The password is `secret`.
@@ -98,4 +95,29 @@ peertube-collector/
├── .env ├── .env
└── utils/ └── utils/
└── webrtc-internals-exporter/ └── webrtc-internals-exporter/
``` ```
---
# Server
The repository contains a `server` directory with a simple MongoDB server (with initializations scripts) and WebUI that serves the WebRTC stats collected by the collector.
## Setup
1. Change to the `server` directory:
```sh
cd server
```
2. Create and configure the environment file based on the `.env.example` file:
```sh
cp .env.example .env
```
3. Start the Docker containers:
```sh
docker compose up
```
The WebUI control panel will be available at [http://localhost:8081](http://localhost:8081).