fix: renamed WEBSOCKET_LISTEN to WEBSOCKET_SERVE

This commit is contained in:
Laureηt 2022-02-07 22:57:38 +01:00
parent 08bdca04f2
commit 254acb7705
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
4 changed files with 5 additions and 5 deletions

2
.env
View file

@ -1,6 +1,6 @@
REDIS_HOST=redis
REDIS_PORT=6379
WEBSOCKET_LISTEN=0.0.0.0
WEBSOCKET_SERVE=0.0.0.0
WEBSOCKET_PORT=6789
RTMP_HOST=rtmp
RTMP_PORT=1935

View file

@ -8,7 +8,7 @@ services:
environment:
- REDIS_HOST=$REDIS_HOST
- REDIS_PORT=$REDIS_PORT
- WEBSOCKET_LISTEN=$WEBSOCKET_LISTEN
- WEBSOCKET_SERVE=$WEBSOCKET_SERVE
- WEBSOCKET_PORT=$WEBSOCKET_PORT
ports:
- $WEBSOCKET_PORT:$WEBSOCKET_PORT

View file

@ -14,8 +14,8 @@ from settings import (
REDIS_HOST,
REDIS_PORT,
USER_TIMEOUT,
WEBSOCKET_LISTEN,
WEBSOCKET_PORT,
WEBSOCKET_SERVE,
)
from utils import User, Users
@ -96,7 +96,7 @@ async def handler(websocket, path: str):
async def main():
"""Start the websocket server."""
async with websockets.serve(handler, WEBSOCKET_LISTEN, WEBSOCKET_PORT): # nosec
async with websockets.serve(handler, WEBSOCKET_SERVE, WEBSOCKET_PORT): # nosec
await asyncio.Future() # run forever

View file

@ -3,7 +3,7 @@ from os import getenv
WEBSOCKET_HOST: str = getenv("WEBSOCKET_HOST", "localhost")
WEBSOCKET_PORT: int = int(getenv("WEBSOCKET_PORT", 6789))
WEBSOCKET_URI: str = f"ws://{WEBSOCKET_HOST}:{WEBSOCKET_PORT}/"
WEBSOCKET_LISTEN: str = getenv("WEBSOCKET_LISTEN", "localhost")
WEBSOCKET_SERVE: str = getenv("WEBSOCKET_SERVE", "localhost")
RTMP_HOST: str = getenv("RTMP_HOST", "localhost")
RTMP_PORT: int = int(getenv("RTMP_PORT", 1935))