forked from open-webui/open-webui
commit
4f78acaa5c
3 changed files with 7 additions and 5 deletions
|
@ -238,7 +238,7 @@ OLLAMA_API_BASE_URL = os.environ.get(
|
|||
)
|
||||
|
||||
OLLAMA_BASE_URL = os.environ.get("OLLAMA_BASE_URL", "")
|
||||
|
||||
KUBERNETES_SERVICE_HOST = os.environ.get("KUBERNETES_SERVICE_HOST", "")
|
||||
|
||||
if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "":
|
||||
OLLAMA_BASE_URL = (
|
||||
|
@ -248,8 +248,10 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "":
|
|||
)
|
||||
|
||||
if ENV == "prod":
|
||||
if OLLAMA_BASE_URL == "/ollama":
|
||||
if OLLAMA_BASE_URL == "/ollama" and KUBERNETES_SERVICE_HOST == "":
|
||||
OLLAMA_BASE_URL = "http://host.docker.internal:11434"
|
||||
else:
|
||||
OLLAMA_BASE_URL = "http://ollama-service.open-webui.svc.cluster.local:11434"
|
||||
|
||||
|
||||
OLLAMA_BASE_URLS = os.environ.get("OLLAMA_BASE_URLS", "")
|
||||
|
|
|
@ -35,4 +35,4 @@ spec:
|
|||
volumes:
|
||||
- name: webui-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: ollama-webui-pvc
|
||||
claimName: open-webui-pvc
|
|
@ -2,8 +2,8 @@ apiVersion: v1
|
|||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: ollama-webui
|
||||
name: ollama-webui-pvc
|
||||
app: open-webui
|
||||
name: open-webui-pvc
|
||||
namespace: open-webui
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
|
|
Loading…
Reference in a new issue