This question is based off the top answer to a previous question on the same topic
My question is, in my custom /docker-entrypoint-initdb.d/ init script, how can I reference env variables that are declared in docker-compose's .env file? Meaning, env variables besides MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD.
for example:
mongo --eval "db.getSiblingDB('sibling').createUser({user: '$SIBLING_USER', pwd: '$SIBLING_PASSWORD', roles: [{ role: 'readWrite', db: 'sibling' }]})"