services: neo4j: image: "neo4j:${NEO4J_TAG}" container_name: neo4j user: "${UID}:${GID}" environment: - "NEO4J_AUTH=neo4j/${NEO4J_PASSWORD}" - 'NEO4J_PLUGINS=["apoc","apoc-extended"]' # Allow APOC procedures (5.x: allowlist/unrestricted) - "NEO4J_dbms_security_procedures_unrestricted=apoc.*" - "NEO4J_dbms_security_procedures_allowlist=apoc.*" # Optional but handy for file import/export via APOC - "NEO4J_apoc_export_file_enabled=true" - "NEO4J_apoc_import_file_enabled=true" - "NEO4J_apoc_import_file_use__neo4j__config=true" - "NEO4J_server_directories_import=/import" ports: - "7474:7474" # HTTP / Browser - "7687:7687" # Bolt volumes: - "${HOME}/neo4j/data:/data" - "${HOME}/neo4j/logs:/logs" - "${HOME}/neo4j/plugins:/plugins" - "${HOME}/neo4j/config:/config" - "${HOME}/neo4j/import:/import" restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:7474"] interval: 10s timeout: 5s retries: 12 api: build: context: . dockerfile: api/Dockerfile container_name: neo4j-api environment: - NEO4J_PASSWORD=${NEO4J_PASSWORD} - NEO4J_URI=${NEO4J_URI} - NEO4J_USER=${NEO4J_USER} - AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT} - AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY} - AZURE_OPENAI_DEPLOYMENT=${AZURE_OPENAI_DEPLOYMENT} - AZURE_OPENAI_API_VERSION=${AZURE_OPENAI_API_VERSION} ports: - "${API_PORT}:8000" depends_on: - neo4j restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:8000/docs"] interval: 5s timeout: 3s retries: 20 start_period: 10s