New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config neo4j in docker-compose.yml? #12
Comments
Hi @alexw668 You can see here the reference for environmental variable on docker-compose.yml . For you case you could either add:
Or create a env file, .env and:
And your .env file would be:
TP |
Thanks for your help! I got it running in a docker container! Since I expose the 7474 port to my host (a MacBook Pro), I thought I should be able to browse my database from the browser; I used boot2docker ip to get the host's IP (192.168.59.103), and went http://192.168.59.103:7474, but I got webpage not available response. I remember read it somewhere that with OS X one has to do something for for it to work, but I forget where. Do you have any idea on this? Again, I appreciate your any help. Alex |
Another question for you, if you don't mind. When I ran both services (neo4j and web) in docker, I saw that my Rails app cannot connect to the neo4j database with the username/password I set in NEO4J_AUTH. Looking at your shell script (build_auth_string.sh) that creates the auth file (under data/dbms), it starts with the user name I set. Looking at the auth file in our other neo4j instance, it always starts with neo4j even though the user name we set is not neo4j. Is it possible that the auth file created by the script is not in the format neo4j demands? Thanks. |
Quick note: In neo4jrb/activegraph#949, it's mentioned that the environment variable of choice is |
define Neo4j password with docker-compose
|
Hi,
I am new to Docker. I have a Rails app that uses Neo4j graph database, and I would like to run this app in docker. I'd want to use a docker-compose.yml to have two services, one is neo4j and the other is web that links to neo4j. In neo4j service part, I would like to use the neo4j image you created (and hosted in Docker Hub):
neo4j:
image: tpires/neo4j
ports:
- "7474:7474"
....
web:
build .
...
links:
- neo4j
I'd want to run the neo4j image with authentication enabled and a username/password set, just like what you mentioned:
docker run -i -t -d -e NEO4J_AUTH=username:password --name neo4j --cap-add=SYS_RESOURCE -p 7474:7474 tpires/neo4j
How would I do it from within my docker-compose.yml? If neo4j's authentication can't be set in docker-compose.yml, where can I do it?
Thanks for your any input.
Alex
The text was updated successfully, but these errors were encountered: