Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New image does not read env variable ME_CONFIG_MONGODB_SERVER #120

Open
roskee opened this issue Jan 16, 2024 · 2 comments
Open

New image does not read env variable ME_CONFIG_MONGODB_SERVER #120

roskee opened this issue Jan 16, 2024 · 2 comments

Comments

@roskee
Copy link

roskee commented Jan 16, 2024

The following docker run command (assuming there is a mongodb running on the same network with the name db) works with the 1.0.0-alpha image but does not work with new images including 1.0.0 and latest. I have run the command multiple times only switching the image tag. It only works with the older images. Is there a change in the way values are provided that is not added in the docker hub documentation?

docker run -it --rm \
    --network bp8fitness-backend_default \
    --name mongo-express \
    -p 8083:8081 \
    -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \
    -e ME_CONFIG_MONGODB_SERVER="db" \
    -e ME_CONFIG_BASICAUTH_USERNAME="user" \
    -e ME_CONFIG_BASICAUTH_PASSWORD="fairly long password" \
    mongo-express:1.0.0-alpha
@mark-gerarts
Copy link

mark-gerarts commented Feb 21, 2024

I ran in the same issue. As a workaround I used ME_CONFIG_MONGODB_URL=. For example, connecting to a locally installed database:

docker run \
  --network host \
  -e ME_CONFIG_MONGODB_URL="mongodb://localhost:27017/app" \
  -e ME_CONFIG_BASICAUTH_USERNAME=user \
  -e ME_CONFIG_BASICAUTH_PASSWORD=pass \
  mongo-express

@maddes-b
Copy link

The documentation on Docker Hub is outdated: see mongo-express/mongo-express#1414 and #106
The usage of ME_CONFIG_MONGODB_SERVER has been changed, normally you would use ME_CONFIG_MONGODB_URL, e.g. mongodb://admin:password@mongodb:27017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants