cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cannot plugin "apoc" in docker-compose.yml file

sngermiyanoglu
Node Clone

Hi,

As I cannot get Neo4j Contanier working, I think there is a problem in my docker-compose.yml

When I run this command (`docker-compose up -d`), It works.

I got an error shown below when I try to calculate the shortest path through `Dijkstra`

```
org.neo4j.driver.exceptions.ClientException: There is no procedure with the name `apoc.algo.dijkstra` registered for this database instance.
Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
```
How can I fix it?

Here is my link : Link 

version: '3'

services:
neo4j-db:
image: neo4j:4.1
container_name: app-neo4j-db
ports:
- 7474:7474
- 7687:7687
volumes:
- $HOME/neo4j/data:/data
- $HOME/neo4j/logs:/logs
- $HOME/neo4j/import:/import
- $HOME/neo4j/plugins:/plugins
environment:
- NEO4J_AUTH: "neo4j/123456"
- NEO4JLABS_PLUGINS: '["apoc"]'
- NEO4J_dbms_security_procedures_unrestricted: apoc.\\\*,gds.\\\*
- dbms_connector_bolt_listen__address: neo4j-db:7687
- dbms_connector_bolt_advertised__address: neo4j-db:7687
healthcheck:
test: cypher-shell --username neo4j --password 123456 'MATCH (n) RETURN COUNT(n);' # Checks if neo4j server is up and running
interval: 10s
timeout: 10s
retries: 5

app:
image: 'springbootneo4jshortestpath:latest'
build:
context: .
dockerfile: Dockerfile
container_name: SpringBootNeo4jShortestPath
depends_on:
neo4j-db:
condition: service_healthy # Wait for neo4j to be ready
links:
- neo4j-db
environment:
- NEO4J_URI: "bolt://neo4j-db:7687"
- NEO4J_PASSWORD: "123456"

volumes:
app-neo4j-db:

 

 

1 ACCEPTED SOLUTION
4 REPLIES 4

Hi @sngermiyanoglu 

Looking at the APOC documentation, it seems that apoc.algo.dijkstra is missing for 4.1 only.
I think the only way is to upgrade Neo4j to 4.2 or later or use the gds library.

4.1
https://neo4j.com/labs/apoc/4.1/overview/apoc.algo/

4.4
https://neo4j.com/labs/apoc/4.4/overview/apoc.algo/apoc.algo.dijkstra/

You said me to change code line shown below.

From

image: neo4j:4.1

to

image: neo4j:4.2 -> 4.3 4.4

 Is it right?

Yes!
4.4.x is best LTS version.

Thank you for your response.