docker-compose.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. services:
  2. ollama:
  3. volumes:
  4. - ollama:/root/.ollama
  5. container_name: ollama
  6. pull_policy: always
  7. tty: true
  8. restart: unless-stopped
  9. image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
  10. open-webui:
  11. build:
  12. context: .
  13. args:
  14. OLLAMA_BASE_URL: '/ollama'
  15. dockerfile: Dockerfile
  16. image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
  17. container_name: open-webui
  18. volumes:
  19. - open-webui:/app/backend/data
  20. depends_on:
  21. - ollama
  22. ports:
  23. - ${OPEN_WEBUI_PORT-3000}:8080
  24. environment:
  25. - 'OLLAMA_BASE_URL=http://ollama:11434'
  26. - 'WEBUI_SECRET_KEY='
  27. - 'OPENAI_API_KEY=${OPENAI_API_KEY}'
  28. - 'LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY}'
  29. - 'LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY}'
  30. extra_hosts:
  31. - host.docker.internal:host-gateway
  32. restart: unless-stopped
  33. watchtower:
  34. container_name: watchtower
  35. image: containrrr/watchtower:latest
  36. restart: unless-stopped
  37. volumes:
  38. - /var/run/docker.sock:/var/run/docker.sock
  39. environment:
  40. - WATCHTOWER_CLEANUP=true
  41. - WATCHTOWER_POLL_INTERVAL=1800
  42. volumes:
  43. ollama: {}
  44. open-webui: {}