MongoDB Init DB import logic added

This commit is contained in:
Rishab
2023-11-02 02:28:00 +00:00
parent 4ff36d7c4b
commit f3a1a0efa9
10 changed files with 1198 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
# Use the official MongoDB imagee
FROM mongo:latest
# Create a directory to host initialization scripts
RUN mkdir -p /docker-entrypoint-initdb.d
# Copy default data JSON files to the initialization directory
COPY ./default-data/*.json /docker-entrypoint-initdb.d/
# Execute the initialization script during container startup
CMD ["mongod"]