Docker: Allow Ollama and Vision env overrides via .env #5726

Make PHOTOPRISM_VISION_URI/KEY and OLLAMA_BASE_URL/OLLAMA_API_KEY
configurable through .env so Ollama Cloud can be tested without
editing compose.yaml directly.
This commit is contained in:
Michael Mayer 2026-07-16 10:21:54 +00:00
parent 311929ab27
commit 5682b3df2e

View file

@ -146,10 +146,10 @@ services:
PHOTOPRISM_INIT: "https"
## Computer Vision (https://docs.photoprism.app/getting-started/config-options/#computer-vision):
PHOTOPRISM_VISION_API: "true" # server: enables service API endpoints under /api/v1/vision (requires access token)
PHOTOPRISM_VISION_URI: "" # client: service URI, e.g. http://hostname/api/v1/vision (leave blank to disable)
PHOTOPRISM_VISION_KEY: "" # client: service access token (for authentication)
OLLAMA_BASE_URL: "http://ollama:11434" # use "https://ollama.com" for Ollama Cloud
OLLAMA_API_KEY: "" # API key required to access Ollama (optional)
PHOTOPRISM_VISION_URI: "${PHOTOPRISM_VISION_URI:-}" # client: service URI, e.g. http://hostname/api/v1/vision (leave blank to disable)
PHOTOPRISM_VISION_KEY: "${PHOTOPRISM_VISION_KEY:-}" # client: service access token (for authentication)
OLLAMA_BASE_URL: "${OLLAMA_BASE_URL:-http://ollama:11434}" # use "https://ollama.com" for Ollama Cloud
OLLAMA_API_KEY: "${OLLAMA_API_KEY:-}" # optional API key for Ollama Cloud
## Additional dependencies and tools:
TF_CPP_MIN_LOG_LEVEL: 1
GOCACHE: "${WORKING_DIR:-/go/src/github.com/photoprism/photoprism}/.local/gocache"