medgraph-engine/docker-compose.yml

64 lines
1.6 KiB
YAML

# MedGraph — Docker Compose
#
# Runs Neo4j + MedGraph API locally.
#
# Usage:
# docker-compose up -d # start services
# docker-compose down # stop services
# docker-compose logs -f api # view API logs
#
# After starting, run: python quickstart.py
# to populate the database with your first book.
services:
# Neo4j Community Edition
# Web UI: http://localhost:7474
# Bolt: bolt://localhost:7687
neo4j:
image: neo4j:5-community
container_name: medgraph-neo4j
ports:
- "7474:7474" # HTTP (browser UI)
- "7687:7687" # Bolt (driver connection)
environment:
- NEO4J_AUTH=neo4j/changeme-local-password
- NEO4J_PLUGINS=["apoc"]
- NEO4J_dbms_security_procedures_unrestricted=apoc.*
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# MedGraph API (FastAPI)
# http://localhost:8000
# Docs: http://localhost:8000/docs
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: medgraph-api
ports:
- "8000:8080"
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USERNAME=neo4j
- NEO4J_PASSWORD=changeme-local-password
- NEO4J_DATABASE=neo4j
- API_KEY=${API_KEY:-medgraph-local}
- GCP_API_KEY=${GCP_API_KEY:-}
- GCP_PROJECT=${GCP_PROJECT:-}
- ENVIRONMENT=development
depends_on:
neo4j:
condition: service_healthy
restart: unless-stopped
volumes:
neo4j_data:
neo4j_logs: