Skip to content

Instantly share code, notes, and snippets.

@agniswarm
Last active December 25, 2019 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agniswarm/3940ff6b306ba753e8118e3466507f22 to your computer and use it in GitHub Desktop.
Save agniswarm/3940ff6b306ba753e8118e3466507f22 to your computer and use it in GitHub Desktop.
Neo4j Docker
version: '3'
services:
graphdb:
image: neo4j
ports:
- 7474:7474
- 7687:7687
volumes:
- $HOME/neo4j/data:/data
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
rm -rf get-docker.sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sh start-container.sh
echo Enter IP of the machine
read ip
docker pull neo4j
docker swarm init --advertise-addr $ip:2377 --listen-addr $ip:2377
mkdir $HOME/neo4j/data
docker stack deploy --compose-file docker-compose.yml graphdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment