From 3d94c4eb257088eefefb6ad596b63b69dfe4531a Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 14 May 2026 12:20:08 -0400 Subject: [PATCH] fix: use list-form command with literal block to avoid sh syntax error YAML folded scalar (>) preserves newlines on more-indented continuation lines, so the shell received && on its own line which is invalid in dash. Switched to the list form [/bin/sh, -c, |script|] so Docker passes the script verbatim to sh -c without double-wrapping. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 59bc0f2..e59fc0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: networks: - rag_net # No healthcheck — qdrant image does not ship curl/wget. - # Dependent services use a wait-loop via our own image which has curl. + # Dependent services wait via a loop in our own image (which has curl). rag-api: build: . @@ -35,11 +35,15 @@ services: restart: unless-stopped depends_on: - qdrant - # Wait for Qdrant to accept HTTP before starting uvicorn - command: > - sh -c "until curl -sf http://qdrant:6333/ > /dev/null 2>&1; - do echo 'waiting for qdrant...'; sleep 3; done - && uvicorn api.main:app --host 0.0.0.0 --port 8000 --workers 2" + command: + - /bin/sh + - -c + - | + until curl -sf http://qdrant:6333/ > /dev/null 2>&1; do + echo 'waiting for qdrant...' + sleep 3 + done + exec uvicorn api.main:app --host 0.0.0.0 --port 8000 --workers 2 ports: - "8000:8000" environment: @@ -72,11 +76,15 @@ services: build: . container_name: odoo18-indexer profiles: ["indexer"] - # Wait for Qdrant before indexing - command: > - sh -c "until curl -sf http://qdrant:6333/ > /dev/null 2>&1; - do echo 'waiting for qdrant...'; sleep 3; done - && python /app/indexer/indexer.py" + command: + - /bin/sh + - -c + - | + until curl -sf http://qdrant:6333/ > /dev/null 2>&1; do + echo 'waiting for qdrant...' + sleep 3 + done + exec python /app/indexer/indexer.py depends_on: - qdrant volumes: