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 889096c + defd58e commit 1e2befcCopy full SHA for 1e2befc
Dockerfile
@@ -0,0 +1,5 @@
1
+FROM mongo:4
2
+
3
+COPY ./entrypoint.sh entrypoint.sh
4
+RUN chmod u+x entrypoint.sh
5
+ENTRYPOINT ./entrypoint.sh
docker-compose.yml
@@ -0,0 +1,8 @@
+version: '3.4'
+services:
+ mongoengine:
+ build:
+ context: .
6
+ image: mongoengine:latest
7
+ ports:
8
+ - 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