fix: renamed WEBSOCKET_LISTEN to WEBSOCKET_SERVE
This commit is contained in:
parent
08bdca04f2
commit
254acb7705
2
.env
2
.env
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue