docker-compose.yaml 764 Bytes
Newer Older
Daniele Viti's avatar
Daniele Viti committed
1
version: '3.8'
Timothy J. Baek's avatar
Timothy J. Baek committed
2
3
4
5
6
7
8
9
10
11
12

services:
  ollama:
    volumes:
      - ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:latest

Timothy J. Baek's avatar
Timothy J. Baek committed
13
  open-webui:
Timothy J. Baek's avatar
Timothy J. Baek committed
14
15
16
    build:
      context: .
      args:
17
        OLLAMA_API_BASE_URL: '/ollama/api'
Timothy J. Baek's avatar
Timothy J. Baek committed
18
      dockerfile: Dockerfile
Timothy J. Baek's avatar
Timothy J. Baek committed
19
20
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
21
    volumes:
Timothy J. Baek's avatar
Timothy J. Baek committed
22
      - open-webui:/app/backend/data
Timothy J. Baek's avatar
Timothy J. Baek committed
23
24
    depends_on:
      - ollama
Timothy J. Baek's avatar
Timothy J. Baek committed
25
    ports:
Daniele Viti's avatar
Daniele Viti committed
26
      - ${OLLAMA_WEBUI_PORT-3000}:8080
Timothy J. Baek's avatar
Timothy J. Baek committed
27
    environment:
28
      - 'OLLAMA_API_BASE_URL=http://ollama:11434/api'
29
      - 'WEBUI_SECRET_KEY='
30
    extra_hosts:
Timothy J. Baek's avatar
Timothy J. Baek committed
31
      - host.docker.internal:host-gateway
32
    restart: unless-stopped
Timothy J. Baek's avatar
Timothy J. Baek committed
33
34
35

volumes:
  ollama: {}
Timothy J. Baek's avatar
Timothy J. Baek committed
36
  open-webui: {}