File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,36 @@ if ! grep -q '^ qwen-search:' docker-compose.prod.yml; then
1717 exit 1
1818fi
1919
20+ # Reject no-op qwen-search stubs (e.g. command: sh -c 'exit 0') — they exit before the HTTP server runs.
21+ echo " === validate qwen-search (must use image ENTRYPOINT, not exit 0 stub) ==="
22+ if docker compose config --format json 2> /dev/null | python3 -c "
23+ import json, sys
24+ c = json.load(sys.stdin)
25+ qs = c.get('services', {}).get('qwen-search')
26+ if not qs:
27+ print('ERROR: resolved config missing qwen-search', file=sys.stderr)
28+ sys.exit(1)
29+ cmd = qs.get('command')
30+ if cmd is None:
31+ print('qwen-search: no command override — OK (ENTRYPOINT runs)')
32+ sys.exit(0)
33+ parts = cmd if isinstance(cmd, list) else [cmd]
34+ flat = ' '.join(str(p) for p in parts)
35+ print('qwen-search command:', flat)
36+ if 'exit 0' in flat:
37+ print(
38+ 'ERROR: qwen-search uses a no-op command. Delete any \" command:\" block under qwen-search in docker-compose.prod.yml, then redeploy.',
39+ file=sys.stderr,
40+ )
41+ sys.exit(1)
42+ sys.exit(0)
43+ " ; then
44+ :
45+ else
46+ echo " ERROR: qwen-search command check failed (see above)." >&2
47+ exit 1
48+ fi
49+
2050echo " === docker compose config --services ==="
2151docker compose config --services
2252
You can’t perform that action at this time.
0 commit comments