I see that you use the environment vars (below) to set the root user at startup. Is it possible to load those using a file?
MONGO_INITDB_ROOT_USERNAME
MONGO_INITDB_ROOT_PASSWORD
This would allow docker swarm users to pass these variables via docker secrets.
https://docs.docker.com/engine/reference/commandline/secret_create/
Something like https://github.com/docker-library/docs/tree/master/mongo#docker-secrets?
thanks, I dont know how I missed that
Most helpful comment
Something like https://github.com/docker-library/docs/tree/master/mongo#docker-secrets?