Skip to content

Instantly share code, notes, and snippets.

@gamersalpha
Created September 23, 2024 19:03
Show Gist options
  • Save gamersalpha/c6103c6f871be43b67373dd6d6edf473 to your computer and use it in GitHub Desktop.
Save gamersalpha/c6103c6f871be43b67373dd6d6edf473 to your computer and use it in GitHub Desktop.
Ollama et Web Open UI docker compose
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
volumes:
- ollama:/root/.ollama
#pull_policy: always
#tty: true
#ports:
# -11434:11434
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
# build:
# context: .
# args:
# OLLAMA_BASE_URL: '/ollama'
# dockerfile: Dockerfile
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='
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
volumes:
ollama: {}
open-webui: {}
@gamersalpha
Copy link
Author

services:
ollama:
image: ollama/ollama:latest
container_name: ollama
volumes:
- /volume1/docker/ollama-web/ollama:/root/.ollama
#pull_policy: always
#tty: true
#ports:
# -11434:11434
restart: unless-stopped

open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
# build:
# context: .
# args:
# OLLAMA_BASE_URL: '/ollama'
# dockerfile: Dockerfile
volumes:
- /volume1/docker/ollama-web/web-openui/data:/app/backend/data
depends_on:
- ollama
ports:
- ${OPEN_WEBUI_PORT-3001}:8080
environment:
- 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY='
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped

volumes:
ollama: {}
open-webui: {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment