openwebui configs

This commit is contained in:
2025-06-30 15:42:55 -06:00
parent 0793fd75f7
commit 5e51176d8a
4 changed files with 114 additions and 0 deletions

2
openwebui/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
data/
tailscale-data/

View File

@@ -0,0 +1,69 @@
services:
tailscale-ingress:
image: tailscale/tailscale:latest
hostname: openwebui
environment:
- TS_AUTHKEY=
# - TS_EXTRA_ARGS=--advertise-tags=tag:container
- TS_SERVE_CONFIG=/config/ts-config.json
- TS_STATE_DIR=/var/lib/tailscale
volumes:
- ./tailscale-data:/var/lib/tailscale
- ./ts-config.json:/config/ts-config.json
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
restart: always
ollama:
volumes:
- ./data/ollama:/root/.ollama
container_name: ollama
pull_policy: always
tty: true
#ports:
# - 11434:11434
restart: always
devices:
- nvidia.com/gpu=all
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
network_mode: service:tailscale-ingress
depends_on:
- tailscale-ingress
open-webui:
build:
context: .
args:
OLLAMA_BASE_URL: '/ollama'
dockerfile: Dockerfile
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
container_name: open-webui
volumes:
- ./data/open-webui:/app/backend/data
#ports:
# - 0.0.0.0:8080:8080
environment:
- 'OLLAMA_BASE_URL=http://127.0.0.1:11434'
- ENABLE_FORWARD_USER_INFO_HEADERS=True
#- ENABLE_OTEL=true
#- ENABLE_OTEL_METRICS=true
#- OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317
- "ENV=dev"
#extra_hosts:
# - host.docker.internal:host-gateway
restart: always
network_mode: service:tailscale-ingress
depends_on:
- tailscale-ingress
otel-collector:
image: otel/opentelemetry-collector-contrib
volumes:
- ./otel-collector.yaml:/etc/otelcol-contrib/config.yaml
#ports:
# - "55678:55678"
network_mode: service:tailscale-ingress
depends_on:
- open-webui

View File

@@ -0,0 +1,24 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
prometheus:
endpoint: 0.0.0.0:8889
namespace: default
processors:
batch:
extensions:
health_check:
service:
extensions: [health_check]
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus]

19
openwebui/ts-config.json Normal file
View File

@@ -0,0 +1,19 @@
{
"TCP": {
"443": {
"HTTPS": true
}
},
"Web": {
"${TS_CERT_DOMAIN}:443": {
"Handlers": {
"/": {
"Proxy": "http://127.0.0.1:8080"
}
}
}
},
"AllowFunnel": {
"${TS_CERT_DOMAIN}:443": false
}
}