Skip to content

Commit 8cc5e57

Browse files
authored
Merge pull request #2833 from bagerard/juannyG-local-docker
Juanny g local docker
2 parents cfc942f + fe6906b commit 8cc5e57

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mongo:5
2+
3+
COPY ./entrypoint.sh entrypoint.sh
4+
RUN chmod u+x entrypoint.sh
5+
ENTRYPOINT ./entrypoint.sh

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
mongoengine:
3+
build:
4+
context: .
5+
image: mongoengine:latest
6+
ports:
7+
- 27017:27017

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
mongod --replSet mongoengine --fork --logpath=/var/log/mongodb.log
4+
mongo db --eval "rs.initiate()"
5+
mongod --shutdown
6+
mongod --replSet mongoengine --bind_ip 0.0.0.0

0 commit comments

Comments
 (0)