Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openmole
gate
Commits
61e5d22b
Commit
61e5d22b
authored
Dec 15, 2017
by
Jonathan Passerat-Palmbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enh: update README with new Docker instructions
parent
94832729
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
README.md
README.md
+13
-10
No files found.
README.md
View file @
61e5d22b
...
@@ -33,16 +33,19 @@ run mongodb://myuser:mypassword@myhost:myport/mydb?mycollection
...
@@ -33,16 +33,19 @@ run mongodb://myuser:mypassword@myhost:myport/mydb?mycollection
You need to have a MongoDB running with the corresponding user declared in the
*admin*
database (by convention).
You need to have a MongoDB running with the corresponding user declared in the
*admin*
database (by convention).
To run a mongoDB using docker (you need to forward the port):
To run a mongoDB using docker (you need to forward the port):
```
jshelllanguage
```
jshelllanguage
docker pull mongo
cd docker
docker run --name some-mongo -p 27017:27017 -d mongo
docker build -t openmole/mongo-gate .
```
mkdir -p data/{configdb,db}
Then, create the user (openmole by defaut):
docker run \
```
jshelllanguage
-v $(pwd)/data/db:/data/db \
mongo
-v $(pwd)/data/configdb:/data/configdb \
use admin
--name openmole-gate-dummy \
db.createUser({ user: 'openmole', pwd: 'rocks', roles: ["readWrite" ] })
-p 27017:27017 \
use openmole
--restart=always \
db.test.save({a:"b"})
-e MONGO_INITDB_DATABASE=openmole \
-d openmole/mongo-gate:latest
```
```
This will start a MongoDB instance prepopulated with an
`openmole`
user and a dummy record in a
`test`
collection.
Then, browse
[
localhost:8080
](
localhost:8080
)
Then, browse
[
localhost:8080
](
localhost:8080
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment