Add Docker support and fix external access issues
🐳 Docker Configuration: - Created Dockerfile for containerized API deployment - Added docker-compose.api.yml for complete stack - Added requirements.txt for Docker builds - Added .dockerignore for optimized builds - Configured external access on 0.0.0.0:8080 📚 Documentation Updates: - Updated quickstart to reflect Neo4j already running - Added Docker deployment tabs with external access info - Updated REST API docs with Docker deployment options - Clarified local vs external access deployment methods 🔧 Configuration: - API_HOST=0.0.0.0 for external access in Docker - Health checks and restart policies - Proper networking and volume configuration - Environment variable configuration ✅ Addresses user issues: - REST API now accessible from outside the machine via Docker - Documentation reflects actual infrastructure state - Clear deployment options for different use cases 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,16 +16,28 @@ description: 'Get your Mem0 Memory System running in under 5 minutes'
|
||||
|
||||
## Installation
|
||||
|
||||
### Step 1: Start Database Services
|
||||
### Step 1: Verify Database Services
|
||||
|
||||
```bash
|
||||
docker compose up -d neo4j
|
||||
```
|
||||
Both required database services are already running:
|
||||
|
||||
<Note>
|
||||
Supabase is already running as part of your existing infrastructure on the localai network.
|
||||
**Neo4j** is already running in Docker container `mem0-neo4j` on ports 7474 (HTTP) and 7687 (Bolt).
|
||||
**Supabase** is already running as part of your existing infrastructure on the localai network.
|
||||
</Note>
|
||||
|
||||
You can verify the services are running:
|
||||
|
||||
```bash
|
||||
# Check running containers
|
||||
docker ps | grep -E "(neo4j|supabase)"
|
||||
|
||||
# Test Neo4j connection
|
||||
curl http://localhost:7474
|
||||
|
||||
# Test Supabase connection
|
||||
curl http://localhost:8000/health
|
||||
```
|
||||
|
||||
### Step 2: Test Your Installation
|
||||
|
||||
```bash
|
||||
@@ -36,13 +48,36 @@ You should see all systems passing.
|
||||
|
||||
### Step 3: Start the REST API Server ✅
|
||||
|
||||
Our Phase 2 implementation provides a production-ready REST API:
|
||||
Our Phase 2 implementation provides a production-ready REST API with two deployment options:
|
||||
|
||||
```bash
|
||||
python start_api.py
|
||||
```
|
||||
<Tabs>
|
||||
<Tab title="Direct Python (Local Only)">
|
||||
For local development and testing:
|
||||
|
||||
The server will start on **http://localhost:8080** with:
|
||||
```bash
|
||||
python start_api.py
|
||||
```
|
||||
|
||||
**Access:** http://localhost:8080 (localhost only)
|
||||
</Tab>
|
||||
|
||||
<Tab title="Docker (External Access) ✅ Recommended">
|
||||
For external access and production deployment:
|
||||
|
||||
```bash
|
||||
# Build and start the API server
|
||||
docker-compose -f docker-compose.api.yml up -d
|
||||
```
|
||||
|
||||
**Access:** http://YOUR_SERVER_IP:8080 (accessible from outside)
|
||||
|
||||
<Note>
|
||||
The Docker deployment automatically configures the API to accept external connections on `0.0.0.0:8080`.
|
||||
</Note>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
Both options provide:
|
||||
- Interactive documentation at `/docs`
|
||||
- Full authentication and rate limiting
|
||||
- Comprehensive error handling
|
||||
|
||||
Reference in New Issue
Block a user