This guide explains how to run the entire DataDetox application using Docker Compose.
- Docker Desktop installed (Get Docker)
- Docker Compose (included with Docker Desktop)
-
Copy the environment file:
cp .env.example .env
-
Edit
.envwith your credentials:# Required: Your OpenAI API key OPENAI_API_KEY=sk-proj-... # Required: Your HuggingFace token HF_TOKEN=hf_... # Required: Your Neo4j credentials NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io NEO4J_USER=neo4j NEO4J_PASSWORD=your-password
-
Start all services:
docker-compose up --build
Or run in detached mode:
docker-compose up -d --build
-
Access the application:
- Frontend: http://localhost:3000
- Chatbot: http://localhost:3000/chatbot
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
The docker-compose.yml starts the following services:
- FastAPI application
- Handles search agent queries
- Connects to Neo4j and HuggingFace
- React + Vite application
- User interface for the chatbot
- Pre-configured to connect to backend at
http://localhost:8000
- Graph database for model lineage
- Browser UI at http://localhost:7474
- Can use cloud Neo4j instead (configure in
.env)
- Scrapes HuggingFace model relationships
- Populates Neo4j database
docker-compose updocker-compose up -ddocker-compose up --builddocker-compose down# All services
docker-compose logs -f
# Specific service
docker-compose logs -f backend
docker-compose logs -f frontenddocker-compose restart backendIf you get "port already in use" errors:
# Stop any running processes
lsof -ti:3000 | xargs kill -9
lsof -ti:8000 | xargs kill -9Make sure:
.envfile exists in the project root- All required variables are set
- No extra quotes around values
Check your Neo4j credentials in .env:
- Ensure
NEO4J_URIincludes the protocol (neo4j+s://) - Verify username and password are correct
- Test connection at https://neo4j.com/cloud
- Check backend is running:
docker-compose ps - View backend logs:
docker-compose logs backend - Test API directly: http://localhost:8000/docs
For development with hot-reload, you can run services separately:
docker-compose up backenddocker-compose up frontendFor production:
- Remove volume mounts from
docker-compose.yml - Use production-grade secrets management
- Set proper Neo4j authentication
- Configure CORS properly in backend
- Use environment-specific
.envfiles
.
├── docker-compose.yml # Orchestrates all services
├── .env # Your secrets (git-ignored)
├── .env.example # Template for .env
├── backend/
│ ├── Dockerfile # Backend container config
│ └── .dockerignore # Files to exclude from build
└── frontend/
├── Dockerfile # Frontend container config
└── .dockerignore # Files to exclude from build
After starting the services:
- Visit http://localhost:3000/chatbot
- Try example queries like "Tell me about BERT models"
- Check the backend logs to see the agent in action
- Explore the API at http://localhost:8000/docs