Common issues and solutions for running CodeIntel with Docker.
Symptoms:
Cannot connect to the Docker daemon at unix:///Users/.../.docker/run/docker.sock
Solution:
- Open Docker Desktop application
- Wait for it to fully start (whale icon in menu bar should be steady)
- Run your command again
Symptoms:
level=warning msg="The \"OPENAI_API_KEY\" variable is not set"
Solution:
-
Make sure
.envfile exists in project root (not just in backend/) -
Check
.envhas all required variables:- OPENAI_API_KEY
- PINECONE_API_KEY
- PINECONE_INDEX_NAME
- SUPABASE_URL
- SUPABASE_KEY
- API_KEY
-
Restart services:
docker compose down docker compose up -d
Symptoms:
Error: bind: address already in use
Solution:
Option 1: Stop conflicting service
# Find what's using port 8000
lsof -i :8000
# Kill it
kill -9 <PID>Option 2: Change ports in docker-compose.yml
backend:
ports:
- "8001:8000" # External:Internal
frontend:
ports:
- "3001:80"Symptoms:
ERROR [backend 4/7] RUN pip install -r requirements.txt
Solution:
-
Clear Docker build cache:
docker compose build --no-cache backend
-
If still failing, check
requirements.txtfor version conflicts
Symptoms:
redis.exceptions.ConnectionError: Error connecting to Redis
Solution:
-
Check Redis is running:
docker compose ps
-
Redis should show "healthy" status
-
If unhealthy, restart it:
docker compose restart redis
Symptoms:
- Frontend loads but can't connect to backend
- Console shows CORS errors
Solution:
-
Check backend is running:
docker compose logs backend
-
Verify
VITE_API_URLis correct indocker-compose.yml:frontend: environment: - VITE_API_URL=http://localhost:8000 # For local dev
-
Check CORS settings in
backend/main.py:allow_origins=[ "http://localhost:3000", "http://localhost", ]
Symptoms:
ERROR: Failed to build tree-sitter parser
Solution: Already handled in Dockerfile with build-essential and git. If still failing:
-
Rebuild with no cache:
docker compose build --no-cache backend
-
Check logs for specific parser error:
docker compose logs backend | grep tree-sitter
Symptoms:
docker compose ps
# Shows "Restarting" status
Solution:
-
Check container logs:
docker compose logs backend docker compose logs frontend
-
Common causes:
- Missing environment variables
- Port conflicts
- Application crashes on startup
-
Test without restart policy:
docker compose down # Remove restart: unless-stopped from docker-compose.yml temporarily docker compose up
Symptoms:
supabase.exceptions.AuthError: Invalid API key
Solution:
- Verify Supabase credentials in
.env - Check SUPABASE_URL and SUPABASE_KEY are correct
- Test connection manually:
docker compose exec backend python -c "from services.database import get_repositories; print(get_repositories())"
Symptoms:
ERROR: Permission denied: '/app/repos'
Solution:
- Check volume permissions in
docker-compose.yml - Create repos directory manually:
mkdir -p backend/repos chmod 755 backend/repos
If nothing else works:
# Stop everything
docker compose down
# Remove all volumes (WARNING: deletes all data)
docker compose down -v
# Remove all containers, images, networks
docker system prune -a
# Rebuild from scratch
docker compose up -d --build# View all running containers
docker ps
# View all containers (including stopped)
docker ps -a
# Check logs for specific service
docker compose logs -f backend
docker compose logs -f frontend
docker compose logs -f redis
# Execute command in running container
docker compose exec backend bash
docker compose exec backend python --version
# Check resource usage
docker stats
# Inspect service configuration
docker compose config
# Check network connectivity
docker compose exec backend ping redis
docker compose exec backend curl http://backend:8000/health- Check GitHub Issues: https://github.com/OpenCodeIntel/opencodeintel/issues
- Run verification script:
./scripts/verify-setup.sh - Check deployment.md for step-by-step instructions
- Make sure Docker Desktop has enough resources (Settings → Resources)
- Recommended: 4GB RAM, 2 CPUs minimum