docker-compose.yaml 748 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
13
14
15
16

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
      dockerfile: Dockerfile
19
    image: ghcr.io/ollama-webui/ollama-webui:main
Timothy J. Baek's avatar
Timothy J. Baek committed
20
    container_name: ollama-webui
21
    volumes:
22
      - ollama-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
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: {}