Spaces:
Runtime error

Ojas1024 commited on
Commit
bcbd2f3
·
1 Parent(s): b55a7cb
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
- FROM python:3.9
 
2
 
3
- WORKDIR /code
 
4
 
5
- COPY ./requirements.txt /code/requirements.txt
 
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
-
9
- COPY . .
10
-
11
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]
 
1
+ # Use the official MongoDB image from Docker Hub
2
+ FROM mongo:latest
3
 
4
+ # Expose port 7860 to the outside world
5
+ EXPOSE 7860
6
 
7
+ # Update MongoDB configuration to bind to 0.0.0.0 (all IP addresses)
8
+ RUN sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
9
 
10
+ # Start MongoDB service
11
+ CMD ["mongod", "--bind_ip_all", "--port", "7860"]