docker-compose mongo import database code example
Example: restore mongodb in docker-compose
docker-compose exec -T <name_of_mongodb_container> mongorestore --archive --gzip < dump.gz
docker-compose exec -T <name_of_mongodb_container> mongorestore --archive --gzip < dump.gz