Files
deprecated-helm-charts/stable/mongodb/files/docker-entrypoint-initdb.d
..

You can copy here your custom .sh, or .js file so they are executed during the first boot of the image.

More info in the bitnami-docker-mongodb repository.