fix(deploy): make bundled Ollama opt-in to avoid duplicate container
CI and Deploy / test (pull_request) Successful in 2m4s
CI and Deploy / deploy (pull_request) Has been skipped

The compose file shipped its own ollama service, so 'docker compose pull'
during deploy re-downloaded the Ollama image and a deploy that starts the
AI stack would spin up a second Ollama alongside an existing/shared one.

- ollama service moved behind a 'bundled-ollama' compose profile, so it is
  excluded from the default pull/up (no duplicate, no re-download)
- ai-service no longer depends_on ollama and is documented to point at a
  shared instance via OLLAMA_BASE_URL (e.g. http://<host>:11435)
- deploy.sh no longer names ollama in 'compose up'

To run a self-contained Ollama: docker compose --profile bundled-ollama up

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
cesnimda
2026-07-03 14:52:42 +02:00
parent d61dd6310b
commit e1e508988a
2 changed files with 11 additions and 3 deletions
+3 -1
View File
@@ -61,7 +61,9 @@ fi
# Force recreation so updated port mappings, env vars, and container config always apply on deploy.
compose up -d --force-recreate --remove-orphans backend frontend
if [ "$DEPLOY_BUILD_AI_SERVICE" = "true" ]; then
compose up -d --force-recreate ai-service ollama
# Ollama is opt-in (compose "bundled-ollama" profile). Deploys reuse an
# existing/shared Ollama via OLLAMA_BASE_URL instead of starting a duplicate.
compose up -d --force-recreate ai-service
fi
if [ -n "${OLLAMA_MODEL:-}" ]; then