services: app: build: context: . dockerfile: Dockerfile container_name: researcher-app ports: - "8000:8000" env_file: - .env environment: PORT: 8000 GRAPHDB_SPARQL_ENDPOINT: ${GRAPHDB_SPARQL_ENDPOINT:-http://graphdb:7200/repositories/researcher} QDRANT_URL: ${QDRANT_URL:-http://qdrant:6333} QDRANT_COLLECTION_NAME: ${QDRANT_COLLECTION_NAME:-papers} depends_on: graphdb: condition: service_healthy qdrant: condition: service_started healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 10s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped networks: - researcher-network # GraphDB - Knowledge Graph Store (RDF/SPARQL) graphdb: image: ontotext/graphdb:10.6.0 container_name: researcher-graphdb ports: - "127.0.0.1:7200:7200" volumes: - graphdb_data:/opt/graphdb/home - ./docker/graphdb/init:/opt/graphdb/init:ro environment: GDB_JAVA_OPTS: >- -Xms1g -Xmx2g -Dgraphdb.home=/opt/graphdb/home -Dgraphdb.workbench.importDirectory=/opt/graphdb/init healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7200/rest/repositories"] interval: 10s timeout: 5s retries: 10 start_period: 30s networks: - researcher-network # Qdrant - Vector Database (RAG) qdrant: image: qdrant/qdrant:v1.12.1 container_name: researcher-qdrant ports: - "127.0.0.1:6333:6333" # HTTP API - "127.0.0.1:6334:6334" # gRPC volumes: - qdrant_data:/qdrant/storage environment: QDRANT__SERVICE__GRPC_PORT: 6334 QDRANT__SERVICE__HTTP_PORT: 6333 # Healthcheck removed because the base image doesn't include curl, # which marks the container unhealthy and blocks app startup. networks: - researcher-network volumes: graphdb_data: name: researcher-graphdb-data qdrant_data: name: researcher-qdrant-data networks: researcher-network: name: researcher-network driver: bridge