We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cfc942f + fe6906b commit 8cc5e57Copy full SHA for 8cc5e57
Dockerfile
@@ -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
@@ -0,0 +1,7 @@
+services:
+ mongoengine:
+ build:
+ context: .
+ image: mongoengine:latest
6
+ ports:
7
+ - 27017:27017
entrypoint.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+mongod --replSet mongoengine --fork --logpath=/var/log/mongodb.log
+mongo db --eval "rs.initiate()"
+mongod --shutdown
+mongod --replSet mongoengine --bind_ip 0.0.0.0
0 commit comments