docker-compose.yml 703 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
version: '3.6'

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

  ollama-webui:
    build:
      context: .
      args:
17
        OLLAMA_API_BASE_URL: '/ollama/api'
Timothy J. Baek's avatar
Timothy J. Baek committed
18
19
20
      dockerfile: Dockerfile
    image: ollama-webui:latest
    container_name: ollama-webui
21
22
    volumes:
      - ollama-webui:/app/backend
Timothy J. Baek's avatar
Timothy J. Baek committed
23
24
    depends_on:
      - ollama
Timothy J. Baek's avatar
Timothy J. Baek committed
25
26
    ports:
      - 3000:8080
Timothy J. Baek's avatar
Timothy J. Baek committed
27
28
    environment:
      - "OLLAMA_API_BASE_URL=http://ollama:11434/api"
29
    extra_hosts:
Timothy J. Baek's avatar
Timothy J. Baek committed
30
      - host.docker.internal:host-gateway
31
    restart: unless-stopped
Timothy J. Baek's avatar
Timothy J. Baek committed
32
33
34

volumes:
  ollama: {}
35
  ollama-webui: {}