update
This commit is contained in:
@@ -117,18 +117,30 @@ echo "Test 8: Ollama service status"
|
||||
if docker ps | grep -q "munich-news-ollama"; then
|
||||
echo "✓ Ollama container is running"
|
||||
|
||||
# Test Ollama API
|
||||
if curl -s http://localhost:11434/api/tags &> /dev/null; then
|
||||
echo "✓ Ollama API is accessible"
|
||||
|
||||
# Check if model is available
|
||||
if curl -s http://localhost:11434/api/tags | grep -q "phi3"; then
|
||||
echo "✓ phi3 model is available"
|
||||
# Check if crawler is running (needed to test Ollama)
|
||||
if docker ps | grep -q "munich-news-crawler"; then
|
||||
# Test Ollama API from inside network using Python
|
||||
if docker-compose exec -T crawler python -c "import requests; requests.get('http://ollama:11434/api/tags', timeout=5)" &> /dev/null; then
|
||||
echo "✓ Ollama API is accessible (internal network)"
|
||||
|
||||
# Check if model is available
|
||||
if docker-compose exec -T crawler python -c "import requests; r = requests.get('http://ollama:11434/api/tags'); exit(0 if 'phi3' in r.text else 1)" &> /dev/null; then
|
||||
echo "✓ phi3 model is available"
|
||||
else
|
||||
echo "⚠ phi3 model not found (may still be downloading)"
|
||||
fi
|
||||
else
|
||||
echo "⚠ phi3 model not found (may still be downloading)"
|
||||
echo "⚠ Ollama API not responding from crawler"
|
||||
fi
|
||||
else
|
||||
echo "⚠ Ollama API not responding"
|
||||
echo "ℹ Crawler not running (needed to test internal Ollama access)"
|
||||
fi
|
||||
|
||||
# Verify port is NOT exposed to host
|
||||
if nc -z -w 2 localhost 11434 &> /dev/null; then
|
||||
echo "⚠ WARNING: Ollama port is exposed to host (should be internal only)"
|
||||
else
|
||||
echo "✓ Ollama is internal-only (not exposed to host)"
|
||||
fi
|
||||
else
|
||||
echo "ℹ Ollama container not running (start with: docker-compose up -d)"
|
||||
|
||||
Reference in New Issue
Block a user