correct backend port ingestion

This commit is contained in:
tcsenpai 2025-05-02 10:46:59 +02:00
parent 547c0454f8
commit 4b77732929
3 changed files with 13 additions and 2 deletions

7
api.py
View File

@ -237,4 +237,9 @@ async def process_query(request: QueryRequest):
interaction.save_session()
if __name__ == "__main__":
uvicorn.run(api, host="0.0.0.0", port=os.getenv("BACKEND_PORT") or 8000)
envport = os.getenv("BACKEND_PORT")
if envport:
port = int(envport)
else:
port = 8000
uvicorn.run(api, host="0.0.0.0", port=port)

View File

@ -62,7 +62,7 @@ services:
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
- BACKEND_URL=${BACKEND_URL:-http://backend:8000}
- BACKEND_URL=http://backend:${BACKEND_PORT:-8000}
networks:
- agentic-seek-net

View File

@ -1,5 +1,8 @@
#!/bin/bash
# Loading .env file
source .env
command_exists() {
command -v "$1" &> /dev/null
}
@ -71,4 +74,7 @@ if ! $COMPOSE_CMD up; then
echo "Possible fixes: Run with sudo or ensure port 8080 is free."
exit 1
fi
echo "Backend is expected to be running on port ${BACKEND_PORT:-8000}"
sleep 10