Last active
October 4, 2017 10:28
-
-
Save noeljackson/e10e135669e04c4b56bc61db5b802ba9 to your computer and use it in GitHub Desktop.
Check to make sure Neo4j started properly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Swap out docker-compose for docker run if you like. | |
docker-compose -f docker-compose.yml up -d | |
docker-compose ps | |
SECONDS=0; \ | |
end="$((SECONDS+240))"; \ | |
while true; do \ | |
[[ $(docker-compose -f docker-compose.yml logs --tail=5 neo4j|grep "Remote interface available") ]] \ | |
&& echo "Connected successfully to database." && break; \ | |
[[ "${SECONDS}" -ge "${end}" ]] && echo "Can't connect to database.'" && exit 1; \ | |
sleep 1; \ | |
done | |
# Run your tests here | |
#docker run --rm -it -v ${PWD}/packages/neo4j:/usr/src/app -w /usr/src/app optimized/docker-nodejs-dev bash -c "npm install && npm run test" | |
docker-compose stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment