Spaces:
Runtime error
Runtime error
mongodb
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
|
| 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"]
|
|
|
|
|
|
|
|
|