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:
53
docker-compose.api.yml
Normal file
53
docker-compose.api.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mem0-api:
|
||||
build: .
|
||||
container_name: mem0-api-server
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- API_HOST=0.0.0.0
|
||||
- API_PORT=8080
|
||||
- API_KEYS=mem0_dev_key_123456789,mem0_docker_key_987654321
|
||||
- ADMIN_API_KEYS=mem0_admin_key_111222333
|
||||
- RATE_LIMIT_REQUESTS=100
|
||||
- RATE_LIMIT_WINDOW_MINUTES=1
|
||||
networks:
|
||||
- mem0-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
depends_on:
|
||||
- neo4j
|
||||
volumes:
|
||||
- ./logs:/app/logs:rw
|
||||
|
||||
neo4j:
|
||||
image: neo4j:5.23
|
||||
container_name: mem0-neo4j-api
|
||||
ports:
|
||||
- "7474:7474"
|
||||
- "7687:7687"
|
||||
environment:
|
||||
- NEO4J_AUTH=neo4j/password123
|
||||
- NEO4J_PLUGINS=["apoc"]
|
||||
- NEO4J_dbms_security_procedures_unrestricted=apoc.*
|
||||
volumes:
|
||||
- neo4j_data:/data
|
||||
- neo4j_logs:/logs
|
||||
networks:
|
||||
- mem0-network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
mem0-network:
|
||||
driver: bridge
|
||||
external: false
|
||||
|
||||
volumes:
|
||||
neo4j_data:
|
||||
neo4j_logs:
|
||||
Reference in New Issue
Block a user