I created a docker-compose.yml
to pull a bunch of apis and initialize a mongo db instance with some pre-pupulated data, have my docker-compose file, and my mongo-init.js
file is located in the root of the project (src/mongo-init.js)
it builds the project and seeds the database, but it also creates extra folders and files in the project I wasn't expecting, a .docker/mongodb/initdb.d
directory, and a mongo directory
with init-mongo.js and mongo-volume
which has a bunch of files in, index-1--441...wt, WiredTiger.lock, etc
- docker-compose.yaml
version: '3.4'
services:
mongo:
image: mongo:latest
container_name: mongodb
hostname: mongodb
ports:
- '27017-27019:27017-27019'
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
thanks in advance for any help