Skip to content

Update Mongo docs for new configuration features #1127

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

Merged
merged 7 commits into from
May 8, 2018

Conversation

bchrobot
Copy link
Contributor

@bchrobot bchrobot commented Jan 25, 2018

This is mostly based on the MySQL docs.

Some notes:

  • I did not use %%STACK%% with a stack.yml because the adminer image does not work with MongoDB and I could not quickly find and vet another Mongo admin image.
  • I wasn't sure whether this image has the same problems around environment variables as MySQL so I skipped mentioning them.
  • Example location of mongo config file may not make sense or reflect best practices.

@yosifkit, @tianon

Closes docker-library/mongo#189

@bchrobot bchrobot changed the title Update docs for new configuration features Update Mongo docs for new configuration features Jan 25, 2018
@bchrobot
Copy link
Contributor Author

bchrobot commented Jan 25, 2018

Addresses docker-library/mongo/issues/189.

Documents docker-library/mongo/pull/145 and docker-library/mongo/pull/225.

Possible duplicate of /pull/916 and /pull/862.

@tianon
Copy link
Member

tianon commented Jan 25, 2018

Haven't looked at the rest of the changes yet, but on the subject of:

I did not use %%STACK%% with a stack.yml because the adminer image does not work with MongoDB and I could not quickly find and vet another Mongo admin image.

That'd be mongo-express: https://hub.docker.com/_/mongo-express/

(and even without an admin image, a docker-compose.yml should still use %%STACK%%)

@bchrobot bchrobot force-pushed the bchrobot-update-docs branch from 9f232e5 to 0a2875e Compare January 27, 2018 13:49
@bchrobot
Copy link
Contributor Author

@tianon updated to use stack.yml

@reflashed
Copy link

This should be merged

mongo/content.md Outdated

### `MONGO_INITDB_ROOT_USERNAME`, `MONGO_INITDB_ROOT_PASSWORD`

These variables are optional, used in conjunction to create a new user and to set that user's password. This user will be created in the `admin` authentication database and given the role of `root`. superuser permissions (see above) for the database specified by the `MYSQL_DATABASE` variable. Both variables are required for a user to be created. If both are present then Mongo will start with authentication enabled: `mongod --auth`. Authentication in MongoDB is fairly complex, so more complex user setup is explicitly left to the user via `/docker-entrypoint-initdb.d/` (see *Initializing a fresh instance* below).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it should not be MYSQL_DATABASE in this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch!

The whole partial sentence of superuser permissions (see above) for the database specified by the MYSQL_DATABASE variable. should have been removed.

@BorntraegerMarc
Copy link

@bchrobot thx for changing it. Would it maybe be possible to add a short comment about using ENV variables for this kind of scenario: docker-library/mongo#257 ?

@bchrobot
Copy link
Contributor Author

@BorntraegerMarc I believe that is a Mongo server issue, not a Docker one. There is an open issue on Mongo's Jira about exposing environment variables within the mongo shell (and thus within Mongo scripts).

@yosifkit yosifkit force-pushed the bchrobot-update-docs branch from 35655e7 to 5349fea Compare May 4, 2018 21:04
@yosifkit yosifkit requested a review from tianon May 4, 2018 21:05
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

Successfully merging this pull request may close these issues.

5 participants