From 19e4f99816658504f9ed813204de18b445cad112 Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Mon, 27 Jan 2025 16:47:51 +0800 Subject: [PATCH] feat: chromadb & ollama services --- swarm/openwebui.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/swarm/openwebui.yml b/swarm/openwebui.yml index c11378b..6acef35 100644 --- a/swarm/openwebui.yml +++ b/swarm/openwebui.yml @@ -32,3 +32,45 @@ services: - traefik.http.routers.open_webui.tls.certresolver=le - traefik.http.routers.open_webui.service=open_webui_app - traefik.http.services.open_webui_app.loadbalancer.server.port=${OPEN_WEBUI_PORT:-8080} + + chromadb: + hostname: chromadb + image: chromadb/chroma:0.5.15 + volumes: + - ./data/chromadb:/chroma/chroma + environment: + - IS_PERSISTENT=TRUE + - ALLOW_RESET=TRUE + - PERSIST_DIRECTORY=/chroma/chroma + ports: + - target: 8000 + published: 8000 + mode: overlay + deploy: + replicas: 1 + restart_policy: + condition: any + delay: 5s + max_attempts: 3 + healthcheck: + test: ["CMD-SHELL", "curl localhost:8000/api/v1/heartbeat || exit 1"] + interval: 10s + retries: 2 + start_period: 5s + timeout: 10s + + ollama: + image: ollama/ollama:latest + hostname: ollama + ports: + - target: 11434 + published: 11434 + mode: overlay + deploy: + replicas: 1 + restart_policy: + condition: any + delay: 5s + max_attempts: 3 + volumes: + - ./data/ollama:/root/.ollama \ No newline at end of file