mongo-express
mongo-express copied to clipboard
Fix default config.
This change is 
When ME_CONFIG_MONGODB_URL
is set, other envs will be ignored like ME_CONFIG_MONGODB_PORT
, ME_CONFIG_MONGODB_AUTH_DATABASE
etc.
So ME_CONFIG_MONGODB_URL
should not set by default, is better to set by user.
Btw, mongo offical docker hub page used mongo-express
, and it's example can't work now, this pr should fix this.
from https://hub.docker.com/_/mongo
# Use root/example as user/password credentials
version: '3.1'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
This fix, in Dockerfile, add ME_CONFIG_MONGODB_SERVER
env var that will be removed with #957.
Since the logic became once (only ME_CONFIG_MONGODB_URL
), we need to consider if remove ME_CONFIG_MONGODB_URL
from Dockerfile (it can be replaced on container run with -e option).
For me, the ME_CONFIG_MONGODB_URL
env var can remain (it's used as a default value); imply that this issue can be closed after #957.
FYI @BlackthornYugen @shakaran
Potentially could also set up this fix in a .env file like what I suggested with #983
As said, after #957, this change isn't needed.
FYI @shakaran @BlackthornYugen