neo4j-labs / llm-graph-builder

Neo4j graph construction from unstructured data using LLMs
https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
Apache License 2.0
2.58k stars 414 forks source link

Changing the port of backend blocks connecting to Neo4j #506

Closed icejean closed 4 months ago

icejean commented 4 months ago

Hi all, I just build up the project on my Windows with Docker Desktop, running on WSL. As I want to run another WSL instance with jupyterhub that uses port 8000,I want to change the backend port to 8088,I modyfied the file docker-compose.yaml and change the port of backend to 8088, and run docker-compose up --build, it's O.K. to build and start up, but when I try to connect to Neo4j, it's just being blocked there, is there any other place I need to modify too? My docker-compose.yaml, just replace all 8000 with 8088:

version: "3"

services:
  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    volumes:
      - ./backend:/app
    environment:
      - NEO4J_URI=${NEO4J_URI-neo4j://database:7687}
      - NEO4J_PASSWORD=${NEO4J_PASSWORD-password}
      - NEO4J_USERNAME=${NEO4J_USERNAME-neo4j}
      - OPENAI_API_KEY=${OPENAI_API_KEY-}
      - DIFFBOT_API_KEY=${DIFFBOT_API_KEY-}
      - EMBEDDING_MODEL=${EMBEDDING_MODEL-all-MiniLM-L6-v2}
      - LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-}
      - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-}
      - LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT-}
      - LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY-}
      - KNN_MIN_SCORE=${KNN_MIN_SCORE-0.94}
      - IS_EMBEDDING=${IS_EMBEDDING-true}
      - GEMINI_ENABLED=${GEMINI_ENABLED-False}
      - GCP_LOG_METRICS_ENABLED=${GCP_LOG_METRICS_ENABLED-False}
      - UPDATE_GRAPH_CHUNKS_PROCESSED=${UPDATE_GRAPH_CHUNKS_PROCESSED-20}
      - NUMBER_OF_CHUNKS_TO_COMBINE=${NUMBER_OF_CHUNKS_TO_COMBINE-6}
      - GCS_FILE_CACHE=${GCS_FILE_CACHE-False}
    container_name: backend
    ports:
      - "8088:8088"
    networks:
      - net

  frontend:
    depends_on:
      - backend
    build:
      context: ./frontend
      dockerfile: Dockerfile
      args:
        - BACKEND_API_URL=${BACKEND_API_URL-http://localhost:8088}
        - REACT_APP_SOURCES=${REACT_APP_SOURCES-local,youtube,wiki,s3}
        - LLM_MODELS=${LLM_MODELS-diffbot,gpt-3.5,gpt-4o}
        - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID-""}
        - BLOOM_URL=${BLOOM_URL-https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true}
        - TIME_PER_CHUNK=${TIME_PER_CHUNK-4}
        - TIME_PER_PAGE=${TIME_PER_PAGE-50}
        - CHUNK_SIZE=${CHUNK_SIZE-5242880}
        - ENV=${ENV-DEV}
    volumes:
      - ./frontend:/app
      - /app/node_modules
    container_name: frontend
    ports:
      - "8080:8080"
    networks:
      - net

networks:
  net:

Best regarts.

icejean commented 4 months ago

Addressed by modifying port 8000 in ./backend/Dockerfile and .env too.