Skip to content

Instantly share code, notes, and snippets.

@bensuperpc
Created June 30, 2026 15:37
Show Gist options
  • Select an option

  • Save bensuperpc/7db6e6308db4676af5c1fb220b7c0b80 to your computer and use it in GitHub Desktop.

Select an option

Save bensuperpc/7db6e6308db4676af5c1fb220b7c0b80 to your computer and use it in GitHub Desktop.
services:
ollama:
container_name: ollama
tty: true
restart: unless-stopped
image: ollama/ollama:${OLLAMA_DOCKER_TAG-0.30.11}
ports:
- ${OLLAMA_PORT-11434}:11434
# devices:
# - /dev/dri
# - /dev/kfd
networks:
- open-webui-network
environment:
- OLLAMA_ORIGINS="*"
- OLLAMA_HOST=0.0.0.0
# - OLLAMA_VULKAN=1
- OLLAMA_NEW_ENGINE=1
- OLLAMA_FLASH_ATTENTION=1
- OLLAMA_CONTEXT_LENGTH=8192
volumes:
- ollama:/root/.ollama
open-webui:
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-git-b711935}
container_name: open-webui
hostname: open-webui
restart: unless-stopped
depends_on:
valkey:
condition: service_healthy
ollama:
condition: service_started
postgres:
condition: service_started
qdrant:
condition: service_started
ports:
- ${OPEN_WEBUI_PORT-3000}:8080
volumes:
- open-webui:/app/backend/data
networks:
- open-webui-network
environment:
# --- OLLAMA ---
- OLLAMA_BASE_URL=http://ollama:11434
# --- POSTGRES ---
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgres_password}@postgres:5432/openwebui
- DATABASE_POOL_SIZE=20
- DATABASE_POOL_MAX_OVERFLOW=10
- DATABASE_POOL_TIMEOUT=30
- DATABASE_POOL_RECYCLE=1800
# --- QDRANT ---
- VECTOR_DB=${VECTOR_DB:-qdrant}
- QDRANT_URI=http://qdrant:${QDRANT_PORT:-6333}
- QDRANT_API_KEY=${QDRANT_API_KEY:-qdrant_api_key}
# --- VALKEY (Websockets & Cache) ---
- REDIS_URL=redis://:${VALKEY_PASSWORD:-valkey_password}@valkey:6379/0
- ENABLE_WEBSOCKET_SUPPORT=true
- WEBSOCKET_MANAGER=redis
- WEBSOCKET_REDIS_URL=redis://:${VALKEY_PASSWORD:-valkey_password}@valkey:6379/1?socket_timeout=86400
- WEBSOCKET_REDIS_OPTIONS={"socket_timeout":null}
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-openwebui_secret_key}
postgres:
image: postgres:18.4-alpine3.24
container_name: postgres
hostname: postgres
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres_password}
- POSTGRES_DB=openwebui
volumes:
- postgres_data:/var/lib/postgresql
networks:
- open-webui-network
qdrant:
image: qdrant/qdrant:${QDRANT_DOCKER_TAG-v1.18.2}
container_name: qdrant
hostname: qdrant
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
environment:
- QDRANT__SERVICE__API_KEY=${QDRANT_API_KEY:-qdrant_api_key}
- QDRANT__SERVICE__ENABLE_API_KEY_AUTHORIZATION=true
volumes:
- qdrant_data:/qdrant/storage
networks:
- open-webui-network
valkey:
image: valkey/valkey:9.1.0-alpine
container_name: valkey
hostname: valkey
restart: unless-stopped
command: valkey-server --requirepass ${VALKEY_PASSWORD:-valkey_password} --maxclients 10000 --timeout 1800
volumes:
- valkey_data:/data
networks:
- open-webui-network
healthcheck:
test: ["CMD", "valkey-cli", "--pass", "${VALKEY_PASSWORD:-valkey_password}", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
ollama: {}
open-webui: {}
postgres_data: {}
qdrant_data: {}
valkey_data: {}
networks:
open-webui-network:
driver: bridge
name: open-webui-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment