Skip to content

Commit 108130e

Browse files
Merge pull request #149 from yasinBursali/fix/docker-open-webui-depends-on
fix(compose): gate open-webui on llama-server health for local/hybrid mode
2 parents d1b0039 + 38c2360 commit 108130e

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Mode-specific overlay: included by resolve-compose-stack.sh for local and hybrid modes only.
2+
# Do NOT add this file to docker-compose directly — it is conditionally included based on DREAM_MODE.
3+
4+
services:
5+
open-webui:
6+
depends_on:
7+
llama-server:
8+
condition: service_healthy

dream-server/scripts/resolve-compose-stack.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,25 @@ if ext_dir.exists():
137137
print(f"WARNING: skipping {service_dir.name}: {e}", file=sys.stderr)
138138
continue
139139
140+
# Include docker-compose.local.yml for local/hybrid mode (Linux GPU backends only)
141+
# This gates open-webui on llama-server health — not appropriate for cloud mode
142+
# (llama-server has no model in cloud mode, so its healthcheck never passes)
143+
local_mode_overlay = script_dir / "docker-compose.local.yml"
144+
if local_mode_overlay.exists() and gpu_backend not in ("apple",):
145+
# DREAM_MODE is read from .env rather than passed as a CLI arg because this script
146+
# is called from multiple contexts (dream-cli, installer, CI) that do not all pass
147+
# it as an argument. Reading .env keeps a single source of truth.
148+
# Future: pass DREAM_MODE as a CLI arg (like gpu_backend) to eliminate this read.
149+
dream_mode = ""
150+
env_file = script_dir / ".env"
151+
if env_file.exists():
152+
for line in env_file.read_text().splitlines():
153+
if line.startswith("DREAM_MODE="):
154+
dream_mode = line.split("=", 1)[1].split("#")[0].strip().strip("\"'")
155+
break
156+
if dream_mode != "cloud":
157+
resolved.append("docker-compose.local.yml")
158+
140159
# Include docker-compose.override.yml if it exists (user customizations)
141160
override = script_dir / "docker-compose.override.yml"
142161
if override.exists():

0 commit comments

Comments
 (0)