Skip to content

Commit

Permalink
Changed ports
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras committed Oct 20, 2024
1 parent aa14601 commit 935c736
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ envprefix: LORIS
events: false
imagename: services/loris
importname: loris
port: 11000
port: 10400
registry: true
releases: true
reponame: loris
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ services:
network: host
environment:
- "LORIS__SERVER__HOST=${LORIS__SERVER__HOST:-0.0.0.0}"
- "LORIS__SERVER__PORTS__HTTP=${LORIS__SERVER__PORTS__HTTP:-11000}"
- "LORIS__SERVER__PORTS__WHIP=${LORIS__SERVER__PORTS__WHIP:-11001}"
- "LORIS__SERVER__PORTS__RTP__MIN=${LORIS__SERVER__PORTS__RTP__MIN:-11002}"
- "LORIS__SERVER__PORTS__RTP__MAX=${LORIS__SERVER__PORTS__RTP__MAX:-11002}"
- "LORIS__SERVER__PORTS__HTTP=${LORIS__SERVER__PORTS__HTTP:-10400}"
- "LORIS__SERVER__PORTS__WHIP=${LORIS__SERVER__PORTS__WHIP:-10401}"
- "LORIS__SERVER__PORTS__RTP__MIN=${LORIS__SERVER__PORTS__RTP__MIN:-10402}"
- "LORIS__SERVER__PORTS__RTP__MAX=${LORIS__SERVER__PORTS__RTP__MAX:-10402}"
- "LORIS__SERVER__TRUSTED=${LORIS__SERVER__TRUSTED:-*}"
- "LORIS__STREAMER__STUN__HOST=${LORIS__STREAMER__STUN__HOST:-stun.l.google.com}"
- "LORIS__STREAMER__STUN__PORT=${LORIS__STREAMER__STUN__PORT:-19302}"
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/02-Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ curl \
--request POST \
--header "Content-Type: application/json" \
--data '{"srt": {"host": "example.com", "port": 12345}}' \
http://localhost:11000/stream
http://localhost:10400/stream
```

You should receive a response containing the port number and STUN server
Expand All @@ -39,7 +39,7 @@ package:
```js
import { WHIPClient } from "@eyevinn/whip-web-client";

const endpoint = "http://localhost:11001/whip/endpoint";
const endpoint = "http://localhost:10401/whip/endpoint";
const client = new WHIPClient({ endpoint });
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });

Expand All @@ -63,7 +63,7 @@ gst-launch-1.0 \
queue \
! \
whipclientsink \
signaller::whip-endpoint="http://localhost:11001/whip/endpoint"
signaller::whip-endpoint="http://localhost:10401/whip/endpoint"
```

## Ping
Expand All @@ -78,5 +78,5 @@ For example, you can use `curl` to do that:
curl \
--request HEAD \
--head \
http://localhost:11000/ping
http://localhost:10400/ping
```
8 changes: 4 additions & 4 deletions docs/docs/03-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ You can configure the service at runtime using various environment variables:
(default: `0.0.0.0`)
- `LORIS__SERVER__PORTS__HTTP` -
port to listen for HTTP requests on
(default: `11000`)
(default: `10400`)
- `LORIS__SERVER__PORTS__WHIP` -
ports to select from when listening for WHIP requests
(default: `11001`)
(default: `10401`)
- `LORIS__SERVER__PORTS__RTP__MIN` -
minimum port to select from when listening for RTP connections
(default: `11002`)
(default: `10402`)
- `LORIS__SERVER__PORTS__RTP__MAX` -
maximum port to select from when listening for RTP connections
(default: `11002`)
(default: `10402`)
- `LORIS__SERVER__TRUSTED` -
trusted IP addresses
(default: `*`)
Expand Down
8 changes: 4 additions & 4 deletions src/loris/config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
class ServerRTPPortsConfig(BaseModel):
"""Configuration for the server RTP ports."""

min: int = Field(11002, ge=1, le=65535)
min: int = Field(10402, ge=1, le=65535)
"""Minimum port to select from when listening for RTP connections."""

max: int = Field(11002, ge=1, le=65535)
max: int = Field(10402, ge=1, le=65535)
"""Maximum port to select from when listening for RTP connections."""

@model_validator(mode="after")
Expand All @@ -27,10 +27,10 @@ def validate_ports(self) -> Self:
class ServerPortsConfig(BaseModel):
"""Configuration for the server ports."""

http: int = Field(11000, ge=0, le=65535)
http: int = Field(10400, ge=0, le=65535)
"""Port to listen for HTTP requests on."""

whip: set[Annotated[int, Field(..., ge=1, le=65535)]] = Field({11001}, min_length=1)
whip: set[Annotated[int, Field(..., ge=1, le=65535)]] = Field({10401}, min_length=1)
"""Ports to select from when listening for WHIP requests."""

rtp: ServerRTPPortsConfig = ServerRTPPortsConfig()
Expand Down

0 comments on commit 935c736

Please sign in to comment.