I am using docker-compose where I set the environmental variables to be:
environment:
- ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_LOGIN}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD}
only when I do:
environment:
- ME_CONFIG_BASICAUTH_USERNAME="username"
- ME_CONFIG_BASICAUTH_PASSWORD="password"
it works there, but I want to make it so you can edit the credentials easily.
for some reason when i do the environmental variables for mongoDB it works:
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
here is my env file
MONGO_ROOT_USER=admin
MONGO_ROOT_PASSWORD=admin
MONGOEXPRESS_LOGIN=punkmeister
MONGOEXPRESS_PASSWORD=testingStuff
I think you should try
and your .env file