services: ollama: image: ollama/ollama:latest container_name: ollama restart: unless-stopped ports: - "${OLLAMA_PORT:-11434}:11434" volumes: - ${DATA_PATH:-/srv/ollama}/models:/root/.ollama # Uncomment for NVIDIA GPUs (needs the NVIDIA Container Toolkit on the host): # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: all # capabilities: [gpu] open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui restart: unless-stopped depends_on: - ollama environment: - OLLAMA_BASE_URL=http://ollama:11434 - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:?secret key required} ports: - "${HTTP_PORT:-3020}:8080" volumes: - ${DATA_PATH:-/srv/ollama}/open-webui:/app/backend/data