- Added docker-compose.api-localai.yml for Docker network integration - Updated config.py to support dynamic Supabase connection strings via environment variables - Enhanced documentation with Docker network deployment instructions - Added specific N8N workflow integration guidance - Solved Docker networking issues for container-to-container communication Key improvements: * Container-to-container API access for N8N workflows * Automatic service dependency resolution (Ollama, Supabase) * Comprehensive deployment options for different use cases * Production-ready Docker network configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
114 lines
2.8 KiB
Plaintext
114 lines
2.8 KiB
Plaintext
---
|
|
title: 'Quickstart'
|
|
description: 'Get your Mem0 Memory System running in under 5 minutes'
|
|
---
|
|
|
|
## Prerequisites
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Docker & Docker Compose" icon="docker">
|
|
Required for Neo4j container (Supabase already running)
|
|
</Card>
|
|
<Card title="Python 3.10+" icon="python">
|
|
For the mem0 core system and API
|
|
</Card>
|
|
</CardGroup>
|
|
|
|
## Installation
|
|
|
|
### Step 1: Verify Database Services
|
|
|
|
Both required database services are already running:
|
|
|
|
<Note>
|
|
**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
|
|
python test_all_connections.py
|
|
```
|
|
|
|
You should see all systems passing.
|
|
|
|
### Step 3: Start the REST API Server ✅
|
|
|
|
Our Phase 2 implementation provides a production-ready REST API with two deployment options:
|
|
|
|
<Tabs>
|
|
<Tab title="Direct Python (Local Only)">
|
|
For local development and testing:
|
|
|
|
```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>
|
|
|
|
<Tab title="Docker Network Integration ✅ For N8N/Containers">
|
|
For integration with N8N or other Docker containers on custom networks:
|
|
|
|
```bash
|
|
# Deploy to localai network (or your custom network)
|
|
docker-compose -f docker-compose.api-localai.yml up -d
|
|
|
|
# Find container IP for connections
|
|
docker inspect mem0-api-localai --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
|
|
```
|
|
|
|
**Access:** http://CONTAINER_IP:8080 (from within Docker network)
|
|
**Example:** http://172.21.0.17:8080
|
|
|
|
<Note>
|
|
Perfect for N8N workflows and Docker-to-Docker communication. Automatically handles service dependencies like Ollama and Supabase connections.
|
|
</Note>
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
All deployment options provide:
|
|
- Interactive documentation at `/docs`
|
|
- Full authentication and rate limiting
|
|
- Comprehensive error handling
|
|
|
|
### Step 4: Test the API
|
|
|
|
Run our test suite to verify everything works:
|
|
|
|
```bash
|
|
# Quick validation test
|
|
python test_api_simple.py
|
|
|
|
# Comprehensive test suite
|
|
python test_api.py
|
|
``` |