From 882b36221367e536f3cd3e9ee5efd3b1017c4342 Mon Sep 17 00:00:00 2001
From: Jean-Francois Laflamme <jflaflamme@gmail.com>
Date: Thu, 17 Aug 2023 07:01:50 +0700
Subject: [PATCH] =?UTF-8?q?Added=20support=20for=20host.docker.internal=20?=
 =?UTF-8?q?(ie:=20to=20use=20local=20chromadb=20ser=E2=80=A6=20(#195)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Added support for host.docker.internal (ie: to use local chromadb server)
---
 docker/.env.example       | 4 ++--
 docker/docker-compose.yml | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docker/.env.example b/docker/.env.example
index 70c61ef96..e6b4e624e 100644
--- a/docker/.env.example
+++ b/docker/.env.example
@@ -21,7 +21,7 @@ OPEN_MODEL_PREF='gpt-3.5-turbo'
 ###########################################
 # Enable all below if you are using vector database: Chroma.
 # VECTOR_DB="chroma"
-# CHROMA_ENDPOINT='http://localhost:8000'
+# CHROMA_ENDPOINT='http://host.docker.internal:8000'
 
 # Enable all below if you are using vector database: Pinecone.
 VECTOR_DB="pinecone"
@@ -48,4 +48,4 @@ PINECONE_INDEX=
 STORAGE_DIR="./server/storage"
 GOOGLE_APIS_KEY=
 UID='1000'
-GID='1000'
\ No newline at end of file
+GID='1000'
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 9e5bff08c..df323cc2d 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -26,3 +26,5 @@ services:
       - .env
     networks:
       - anything-llm
+    extra_hosts:
+      - "host.docker.internal:host-gateway"
-- 
GitLab