File size: 1,560 Bytes
b4856f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
version: '3.8'
services:
# Neo4j Knowledge Graph (Production Feature)
neo4j:
image: neo4j:5.15-community
container_name: modelx-neo4j
ports:
- "7474:7474" # Browser UI
- "7687:7687" # Bolt protocol
environment:
NEO4J_AUTH: neo4j/modelx2024
NEO4J_PLUGINS: '["apoc"]'
NEO4J_dbms_security_procedures_unrestricted: "apoc.*"
volumes:
- ./data/neo4j/data:/data
- ./data/neo4j/logs:/logs
healthcheck:
test: ["CMD-SHELL", "cypher-shell -u neo4j -p modelx2024 'RETURN 1' || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- GROQ_API_KEY=${GROQ_API_KEY}
- PYTHONUNBUFFERED=1
- NEO4J_ENABLED=true
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=modelx2024
volumes:
- ./src:/app/src
- ./data:/app/data # Persist storage data
command: python main.py
depends_on:
neo4j:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/status"]
interval: 30s
timeout: 10s
retries: 3
# Frontend (Next.js)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://backend:8000
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
- /app/. next
|