moodlehq / moodle-docker

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

Add support for local.yml #242

Closed andrewnicols closed 1 year ago

andrewnicols commented 1 year ago

This change adds support for a local yml file to include any customisations that users may wish to include as standard.

This may, for example include changes to existing containers, or it may include the addition of additional containers such as database admin tooling, or proxy servers.

scara commented 1 year ago

Hi @andrewnicols, LGTM!

Is there any reason not to kept aligned even moodle-docker-compose.cmd?

TIA, Matteo

andrewnicols commented 1 year ago

Only because I totally forgot when I wrote this several months ago (and am still amazed that people use Windows for development).

I don't have a Windows machine to be able to test it I'm afraid.

stronk7 commented 1 year ago

Only tiny suggestion that I'd do here is to add a comment about ensuring that the loading of the local.yml always remains the last one before calling compose. Just to avoid forgetting about that in the future.

Other than that, I think this is the correct way to go, enabling virtually any customisation without overburdening configuration. And, at the same time, it also makes it really easier to test thing that may end into the main scripts if good enough. So big +1 here.

I'll run some basic test under Unix and Windows soon...

stronk7 commented 1 year ago

Ah, and would be great if we can add the very same ECHO "Including local options from... to the Windows one. Sorry just saw it now.

andrewnicols commented 1 year ago

Only tiny suggestion that I'd do here is to add a comment about ensuring that the loading of the local.yml always remains the last one before calling compose. Just to avoid forgetting about that in the future.

Done :)

Ah, and would be great if we can add the very same ECHO "Including local options from... to the Windows one. Sorry just saw it now.

And done - hope I got this right.

stronk7 commented 1 year ago

Thanks, looks perfect! Will test shortly...

stronk7 commented 1 year ago

Tested both under Unix and Windows, it worked great, so far!