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: