Skip to content

Instantly share code, notes, and snippets.

@bensuperpc
Last active June 29, 2026 11:50
Show Gist options
  • Select an option

  • Save bensuperpc/2826798e6b64918e56eb434f92a75a53 to your computer and use it in GitHub Desktop.

Select an option

Save bensuperpc/2826798e6b64918e56eb434f92a75a53 to your computer and use it in GitHub Desktop.
docker-compose ollama + openwebui
services:
ollama:
container_name: ollama
tty: true
restart: unless-stopped
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
ports:
- ${OLLAMA_PORT-11434}:11434
# devices:
# - /dev/dri
# - /dev/kfd
networks:
- open-webui-network
environment:
# - OLLAMA_VULKAN=1
- OLLAMA_NEW_ENGINE=1
- OLLAMA_FLASH_ATTENTION=1
- OLLAMA_CONTEXT_LENGTH=2048
volumes:
- ollama:/root/.ollama
open-webui:
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
container_name: open-webui
volumes:
- open-webui:/app/backend/data
depends_on:
- ollama
ports:
- ${OPEN_WEBUI_PORT-3000}:8080
environment:
- 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY='
restart: unless-stopped
networks:
- open-webui-network
volumes:
ollama: {}
open-webui: {}
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