- Fixed:
web/app.pynow calls the OpenAI-compatible API server - Result: UI and frontend share the same execution path as API clients
- Fixed: Corrected structure mismatch in query history rendering
- Result: History now properly shows execution time, attempts, and SQL for each query
- Issue: Host network mode doesn't work on macOS (Docker runs in VM)
- Fixed: Created
docker-compose.macos.ymlwith proper port mappings - Result: Databases now accessible on localhost with correct ports
- Fixed: IntelligentSQLAgent now correctly passes connection params to DatabaseIntrospectionProvider
- Result: Schema discovery and query execution work properly
# Use the macOS-specific docker-compose file
docker-compose -f docker-compose.macos.yml up -d
# Or if you've already started with the default file, restart:
docker-compose down
docker-compose -f docker-compose.macos.yml up -d# Test PostgreSQL
psql -h localhost -p 5432 -U text2sql -d benchmark
# Password: text2sql123
# Test MySQL
mysql -h 127.0.0.1 -P 3306 -u text2sql -p benchmark
# Password: text2sql123# Start API server
make api-server
# Start Web UI
make web-ui
# Or directly
streamlit run web/app.py- Web UI: http://localhost:8501
- API Server: http://localhost:8711
- PostgreSQL: localhost:5432
- MySQL: localhost:3306
- MongoDB: localhost:27017
- ClickHouse: localhost:8123
When using the Web UI or API, use these connection settings:
{
"type": "postgresql",
"host": "localhost",
"port": 5432,
"database": "benchmark",
"user": "text2sql",
"password": "text2sql123"
}{
"type": "mysql",
"host": "localhost",
"port": 3306,
"database": "benchmark",
"user": "text2sql",
"password": "text2sql123"
}Run the test script to verify everything works:
python scripts/manual_tests/test_query_execution.pyExpected output:
- ✅ Database connection successful
- ✅ Query execution with multi-attempt strategy
- ✅ Ambiguity detection for unclear queries
- ✅ SQL generation and result retrieval
If you get port conflicts:
# Check what's using the port
lsof -i :5432
# Stop conflicting service or change port in docker-compose.macos.ymlIf database connections fail:
# Ensure containers are running
docker ps
# Check container logs
docker logs text2sql-postgres
docker logs text2sql-mysql
# Restart containers
docker-compose -f docker-compose.macos.yml restartIf query generation fails:
# Ensure Ollama is running
ollama serve
# Pull required model
ollama pull qwen2.5-coder:7b| Aspect | Linux | macOS |
|---|---|---|
| Docker Network | Host mode works directly | Host mode doesn't expose ports |
| Port Access | Direct via host network | Requires explicit port mapping |
| Localhost | Same as container | Use port mappings or host.docker.internal |
| Performance | Native | Slightly slower (VM overhead) |
- Always use
docker-compose.macos.ymlon macOS for proper port mappings - The Web UI and API can run natively (outside Docker) and connect to containerized databases
- For production on macOS, consider using Kubernetes or cloud deployment for better performance
Developed by Tokligence | GitHub