summaryrefslogtreecommitdiff
path: root/compose.yml
blob: 361301c9f221be021c270251aec57765fff85e67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
services:

  app:
    build: .
    ports:
      - "8000:80"
    depends_on:
      - ollama
    restart: unless-stopped

  ollama:
    image: ollama/ollama
    volumes:
      - ollama_data:/root/.ollama
    restart: unless-stopped
    # Expose port 11434 if you want to reach Ollama directly from your host
    # (e.g. to run `ollama pull` without exec-ing into the container).
    ports:
      - "11434:11434"

    # ── GPU support ──────────────────────────────────────────────────────────
    # Uncomment the block below if your server has an NVIDIA GPU.
    # Requires the NVIDIA Container Toolkit:
    #   https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
    #
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: all
    #           capabilities: [gpu]

volumes:
  ollama_data: