neo4j / docker-neo4j

Docker Images for the Neo4j Graph Database
Apache License 2.0
327 stars 171 forks source link

neo4j docker swarm service #141

Open lucapaganotti opened 6 years ago

lucapaganotti commented 6 years ago

Sorry if I'm posting in the wrong place. Close this issue if OFF-TOPIC I'm trying to create a swarm service for a single instance of neo4j, I get a strange behaviour, the neo4j container starts and then soon stops itself continuously. I issue this docker command:

docker service create --name neo4j \ --publish 7474:7474 --publish 7473:7473 --publish 7687:7687 \ --mount type=bind,src=/home/softech/neo4j/data,dst=/data \ --mount type=bind,src=/home/softech/neo4j/conf,dst=/var/lib/neo4j/conf \ --mount type=bind,src=/home/softech/neo4j/import,dst=/var/lib/neo4j/import \ --mount type=bind,src=/home/softech/neo4j/logs,dst=/var/lib/neo4j/logs \ --mount type=bind,src=/home/softech/neo4j/plugins,dst=/var/lib/neo4j/plugins \ --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock neo4j:latest

If I run the neo4j container on another linux box issuing:

docker run -d --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/data:/data neo4j

the container starts and persists without stopping.

Sorry for the noise.

s4h1u1b9h9a2m commented 5 years ago

Have a look here Docker Compose. Run this compose file.