From eab1544c7f8aabb4d630bb70c9c8302a130f6299 Mon Sep 17 00:00:00 2001 From: sawyer bristol Date: Sat, 30 Mar 2024 13:47:34 -0600 Subject: [PATCH] adding endpoint for ollama api fix network --- ai.yml | 14 ++++++++++++-- dashy/conf.yml | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ai.yml b/ai.yml index 0b4843b..b27682c 100644 --- a/ai.yml +++ b/ai.yml @@ -60,7 +60,7 @@ services: container_name: ollama restart: always networks: - - internal + - web expose: - 11434 env_file: @@ -68,7 +68,17 @@ services: volumes: - ollama_data:/root/.ollama labels: - - "traefik.enable=false" + - "traefik.enable=true" + - "traefik.docker.network=web" + - "traefik.http.routers.ollama-api.entrypoints=http" + - "traefik.http.routers.ollama-api.rule=Host(`ollama-api.${DOMAIN}`)" + - "traefik.http.middlewares.ollama-api-https-redirect.redirectscheme.scheme=https" + - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https" + - "traefik.http.routers.ollama-api.middlewares=ollama-api-https-redirect" + - "traefik.http.routers.ollama-api-secure.entrypoints=https" + - "traefik.http.routers.ollama-api-secure.rule=Host(`ollama-api.${DOMAIN}`)" + - "traefik.http.routers.ollama-api-secure.tls=true" + - "traefik.http.routers.ollama-api-secure.tls.certresolver=${DNS}" deploy: resources: reservations: diff --git a/dashy/conf.yml b/dashy/conf.yml index 31e64cb..67ffdfd 100644 --- a/dashy/conf.yml +++ b/dashy/conf.yml @@ -116,6 +116,10 @@ sections: icon: https://ollama.com/public/ollama.png url: https://ollama.$DOMAIN target: newtab + - title: Ollama API + icon: https://ollama.com/public/ollama.png + url: https://ollama-api.$DOMAIN + target: clipboard - name: Gaming displayData: sortBy: default