forked from kristjan/cjvt-valency
parent
49e45900c4
commit
d8fd3ad30b
@ -0,0 +1,5 @@
|
||||
FROM mongo:latest
|
||||
|
||||
WORKDIR /
|
||||
COPY init_inside_container.sh /.
|
||||
COPY create.js /.
|
@ -0,0 +1,3 @@
|
||||
# Some caveats
|
||||
* Access mongo-express using `0.0.0.0:8087` instead of `localhost:...`.
|
||||
* Run make from the root Makefile `make database`. You might need to run it several times (wait for conatiners to come up, etc.).
|
@ -1,5 +1,3 @@
|
||||
db.auth("testuser", "testpass")
|
||||
\
|
||||
use valdb
|
||||
\
|
||||
db.createUser({user: "kristjan", pwd: "password", roles: ["readWrite"]})
|
||||
db.auth("testadmin", "testadminpass")
|
||||
use valdb
|
||||
db.createUser({user: "testuser", pwd: "testuserpass", roles: ["readWrite"]})
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker ps | grep mongo:latest | awk '{print $1}'
|
||||
docker ps | grep my-mongo | awk '{print $1}'
|
||||
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
mongo admin < /create.js
|
Loading…
Reference in new issue