File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.8-slim-buster AS build
1+ FROM mongo:4
22
3- COPY requirements-dev.txt .
4- RUN pip install --upgrade pip
5- RUN pip install -r requirements-dev.txt
6- RUN pip install "pymongo>=3.4,<4.0"
7-
8- WORKDIR /app
9- COPY . ./
3+ COPY ./entrypoint.sh entrypoint.sh
4+ RUN chmod u+x entrypoint.sh
5+ ENTRYPOINT ./entrypoint.sh
Original file line number Diff line number Diff line change @@ -4,14 +4,5 @@ services:
44 build :
55 context : .
66 image : mongoengine:latest
7- network_mode : host
8- depends_on :
9- - mongo
10- working_dir : /app
11- volumes :
12- - .:/app
13- mongo :
14- image : mongo:4
15- restart : always
167 ports :
178 - 27017:27017
Original file line number Diff line number Diff line change 1+ #! /usr/bin/bash
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
You can’t perform that action at this time.
0 commit comments