diff --git a/config/config.py b/config/config.py index a4d65fd..5a77c04 100644 --- a/config/config.py +++ b/config/config.py @@ -13,4 +13,6 @@ AI71_API_KEY=os.getenv('AI71_API_KEY') AI71_BASE_URL=os.getenv('AI71_BASE_URL') -OPEN_AI_API_KEY=os.getenv('OPENAI_KEY') \ No newline at end of file +OPEN_AI_API_KEY=os.getenv('OPENAI_KEY') + +REDIS_ENDPOINT=os.getenv('REDIS_ENDPOINT') \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1c2ca23..4a491b0 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -25,4 +25,4 @@ COPY . . EXPOSE 3000 # Command to build and start the Next.js application with Bun -CMD ["bun","run", "build", "&&", "bun", "run", "start"] \ No newline at end of file +CMD ["bun","run", "build", "&&", "bun", "run", "start", "--host", "0.0.0.0"] \ No newline at end of file diff --git a/src/connection_manager/connection_manager.py b/src/connection_manager/connection_manager.py index b7f86ab..f68f543 100644 --- a/src/connection_manager/connection_manager.py +++ b/src/connection_manager/connection_manager.py @@ -1,6 +1,6 @@ from fastapi import WebSocket import redis - +from config.config import REDIS_ENDPOINT """ The ConnectionManager class is responsible for managing WebSocket connections. It stores the WebSocket objects @@ -12,9 +12,7 @@ class ConnectionManager: def __init__(self): - self.redis_client = redis.Redis( - host="localhost", port=6379, decode_responses=True - ) + self.redis_client = redis.from_url(REDIS_ENDPOINT) self.active_connections = {} async def connect(