76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
networks:
|
|
traefik-public:
|
|
external: true
|
|
|
|
volumes:
|
|
open_webui: {}
|
|
|
|
services:
|
|
open_webui:
|
|
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG:-main}
|
|
environment:
|
|
- DOMAIN=${DOMAIN}
|
|
- PORT=${OPEN_WEBUI_PORT:-8080}
|
|
- WEBUI_URL=http://localhost:${OPEN_WEBUI_PORT:-8080}
|
|
- ENABLE_OLLAMA_API=${ENABLE_OLLAMA_API:-false}
|
|
volumes:
|
|
- open_webui:/app/backend/data
|
|
expose:
|
|
- ${OPEN_WEBUI_PORT:-8080}
|
|
networks:
|
|
- traefik-public
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.open_webui.open_webui == true
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.swarm.network=traefik-public
|
|
- traefik.constraint-label=traefik-public
|
|
- traefik.http.routers.open_webui.entrypoints=https
|
|
- traefik.http.routers.open_webui.rule=Host(`bot.${DOMAIN}`)
|
|
- 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:latest
|
|
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 |