Skip to content

Commit ec6158d

Browse files
committed
docs: update README.md
1 parent 75493db commit ec6158d

File tree

5 files changed

+81
-33
lines changed

5 files changed

+81
-33
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,20 @@ mv example.env .env
8686
diesel migration run
8787
```
8888

89+
- Run etcd, postgresql and redis
90+
91+
```
92+
docker-compose up -d
93+
```
94+
8995
- Build & Run the Server
9096

9197
```bash
92-
cargo run --release
98+
# Start Signalling
99+
cargo run --bin signalling
100+
101+
# Start SFU
102+
cargo run --bin sfu
93103
```
94104

95105
### 🐳 Run with Docker

crates/str0m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 7ca14b4e45e0e24a256bafdb64a5cbded2da2825

docker-compose.yml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,48 @@
1+
version: '3.8'
2+
13
services:
2-
waterbus-signalling:
3-
image: docker.io/lambiengcode/waterbus-signalling
4-
container_name: waterbus-signalling
5-
env_file:
6-
- .env
7-
ports:
8-
- "5998:5998/tcp"
9-
- "5998:5998/udp"
10-
- "50052:50052/tcp"
4+
postgres:
5+
image: postgres:17
6+
container_name: postgres
117
restart: unless-stopped
8+
environment:
9+
POSTGRES_USER: postgres
10+
POSTGRES_PASSWORD: 12345678
11+
POSTGRES_DB: waterbusdb
12+
ports:
13+
- "5432:5432"
14+
volumes:
15+
- pg_data:/var/lib/postgresql/data
1216

13-
waterbus-sfu:
14-
image: docker.io/lambiengcode/waterbus-sfu
15-
container_name: waterbus-sfu
16-
env_file:
17-
- .env
17+
redis:
18+
image: redis:7
19+
container_name: redis
20+
restart: unless-stopped
1821
ports:
19-
- "49152-65535:49152-65535/udp"
20-
- "50051:50051/tcp"
22+
- "6379:6379"
23+
volumes:
24+
- redis_data:/data
25+
26+
etcd:
27+
image: quay.io/coreos/etcd:v3.5.13
28+
container_name: etcd
2129
restart: unless-stopped
30+
command: >
31+
/usr/local/bin/etcd
32+
--name etcd-node
33+
--data-dir /etcd-data
34+
--initial-advertise-peer-urls http://0.0.0.0:2380
35+
--listen-peer-urls http://0.0.0.0:2380
36+
--listen-client-urls http://0.0.0.0:2379
37+
--advertise-client-urls http://0.0.0.0:2379
38+
--initial-cluster etcd-node=http://0.0.0.0:2380
39+
ports:
40+
- "2379:2379"
41+
- "2380:2380"
42+
volumes:
43+
- etcd_data:/etcd-data
44+
45+
volumes:
46+
pg_data:
47+
redis_data:
48+
etcd_data:

example.env

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
1+
# Application
12
APP_PORT=5998
23
API_SUFFIX=busapi/v3
3-
APP_CLIENT_SECRET=change-this-client-secret
4-
APP_SERVER_SECRET=change-this-server-secret
4+
APP_CLIENT_SECRET=open@waterbus
5+
APP_SERVER_SECRET=open@waterbus
56
APP_TLS_ENABLED=false
67

7-
DATABASE_URL=postgres://user:password@127.0.0.1:5432/waterbusdb
8+
# Database
9+
DATABASE_URL=postgresql://postgres:12345678@127.0.0.1:5432/waterbusdb
810

9-
REDIS_URIS=redis://127.0.0.1:6379?protocol=resp3,redis://127.0.0.1:6380?protocol=resp3
11+
# Redis Cluster
12+
REDIS_URIS=redis://127.0.0.1:6379?protocol=resp3
1013

11-
STORAGE_ACCOUNT_ID=your-account-id
12-
STORAGE_ACCESS_KEY=your-access-key
13-
STORAGE_SECRET_KEY=your-secret-key
14-
STORAGE_REGION=auto
15-
STORAGE_BUCKET=your-bucket
16-
STORAGE_ENDPOINT=https://<account>.r2.cloudflarestorage.com/your-bucket
17-
STORAGE_CUSTOM_DOMAIN=cdn.yourdomain.com
14+
# Object Storage (S3, R2, MinIO)
15+
STORAGE_ACCOUNT_ID=
16+
STORAGE_ACCESS_KEY=
17+
STORAGE_SECRET_KEY=
18+
STORAGE_REGION=
19+
STORAGE_BUCKET=waterbus
20+
STORAGE_ENDPOINT=
21+
STORAGE_CUSTOM_DOMAIN=
1822

19-
AUTH_JWT_SECRET=your-jwt-secret
23+
# Auth / JWT
24+
AUTH_JWT_SECRET=77d486ea83cff8278dbcab878ee9d9ab
2025
AUTH_JWT_TOKEN_EXPIRES_IN=86400
21-
AUTH_REFRESH_SECRET=your-refresh-secret
26+
AUTH_REFRESH_SECRET=lf0fcca550468245c540d52c3b21c2dbd
2227
AUTH_REFRESH_TOKEN_EXPIRES_IN=31536000
2328

29+
# WebRTC
2430
RTC_EXTERNAL_IP=
2531
RTC_PORT_MIN=19000
2632
RTC_PORT_MAX=60000
33+
CF_TURN_ACCESS_KEY=
34+
CF_TURN_SECRET_KEY=
2735

28-
DIST_GROUP_ID=waterbus-group-0
36+
# Distributed System
37+
DIST_GROUP_ID=waterbus0
2938
DIST_SFU_HOST=http://0.0.0.0
3039
DIST_SFU_PORT=50051
3140
DIST_DISPATCHER_HOST=http://0.0.0.0
3241
DIST_DISPATCHER_PORT=50052
3342
DIST_ETCD_URI=127.0.0.1:2379
3443

44+
# Egress
3545
EGRESS_MOQ_URI=http://localhost:4443/waterbus/
36-
EGRESS_HLS_MODE=LOCAL
46+
EGRESS_HLS_MODE=LOCAL

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
signalling:
22
cargo run --bin signalling
33
sfu:
4-
cargo run --bin sfu --release
4+
cargo run --bin sfu
55
build-proto:
66
cargo build -p waterbus-proto
77
build-signalling:

0 commit comments

Comments
 (0)