Looking through the current Dockerfile for 3.07, it looks like there is the
ability to run initalization scripts from: dockerfile-entrypoint-initdbd
When using a bash script this works fine:
#!/bin/sh
arangosh --server.endpoint=unix:///tmp/arangodb-tmp.sock \
--server.password ROOTPASSWORD \
--javascript.execute-string "db._createDatabase('mydb', null, [{username:
'user', password: 'password'}]);"
But a javascript file doesn't because it's trying to connect to port 8529
instead of through the socket and it also prompts for the password. Should
the docker-entrypoint.sh be changed or is there other code besides:
db._createDatabase('mydb', null, [{username: 'user', password:
'password'}]);
that should be contained in the javascript file.
Here's my Dockerfile
FROM arangodb/arangodb:3.0.7
MAINTAINER Andy Barilla
ENV ARANGO_ROOT_PASSWORD=ROOTPASSWORD
# ADD mydb-setup.js /docker-entrypoint-initdb.d/
ADD mydb-setup.sh /docker-entrypoint-initdb.d/
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.