moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
373 stars 244 forks source link

Add support for database manager/administration tool #235

Open michael-milette opened 1 year ago

michael-milette commented 1 year ago

Could you please add optional support for a database administration tool like Adminer or phpMyAdmin? I would like to be able to access and manipulate my Moodle database through a web-based tool.

For example, while Adminer can be installed inside of Moodle as a plugin, sometimes things break and you cannot get into Moodle to fix it. I can think of many other situations where such a tool could be desirable and helpful.

michael-milette commented 1 year ago

Submitted a pull request #236 which adds the requested feature.

stronk7 commented 1 year ago

Hi @michael-milette ,

thanks for your contribution! I must confess that I'm not 100% sold about the idea of start adding tools to the docker composition as #236 does. There are various points about that:

  1. The number of DB managers can be endless. What if somebody wants to add pgadmin, or xxxmin, ot zzzmin? What decides which ones are worth the effort of being maintained?
  2. What if people start asking for other tools, say CodeSniffer, or Psalm, or PHPmd, or ... (just imagining...) at which point we should stop.
  3. In the case of adminer/phpmyadmin ... there are already moodle plugins embedding them within Moodle, isn't it? So a developer could have them just in place in their dev environment and done.
  4. Also, for the case of DB managers, we recently added the ability of making the databases accessible from the host, so they can be kept 100% apart, in the host or any other system perfectly.

So, as said... I'm not convinced about this, as a concept. I'm going to gather opinions in the team about this issue (and the PR). Again, thanks for proposing it!

Ciao :-)

sarjona commented 1 year ago

I love adminer (since I met it, I haven't used any other database client) but I can see why Eloy is raising this concern. Instead of having adminer or any other tool in the moodle-docker, I would prefer having documented how to use them locally.

andrewnicols commented 1 year ago

As a suggested alternative to this, perhaps we can have an option to load an arbitrary yml file into the mix.

Right now, the moodle-docker-compose script combines multiple yml files using something like:

dockercompose="${dockercompose} -f "${basedir}/another/file.yml"

Perhaps we can have this include a local.yml if one is available in the basedir, and that can contain any personal additions, like adminer, etc. if that is the individuals' preference.

I do think that adminer/etc. are useful, but if we start to bundle every tool under the sun, then where do we stop, and at what point does it become too difficult to use because of the plethora of options that you may need, and which need to specified prior to calling composer up.

paulholden commented 1 year ago

Re: @stronk7's reference in point 4. - this was done in https://github.com/moodlehq/moodle-docker/issues/222 and is great for allowing local connections to the Docker DB

Not convinced we should be bundling these tools either