-
Notifications
You must be signed in to change notification settings - Fork 254
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
Env var to flag moodle-docker environment running #285
Comments
Heh, I've a slightly more complex stuff here (I've a minimalistic Anyway, blah, blah, blah, that About the suggestion regarding the creation and export of a new So, my side, I'm neutral here. Acceptable. Ciao :-) |
Thinking in the direction if it can provide something meaningful:
which can be of use as both flag "hey, I'm running a moodle-docker environment" and some potential to do something in code, based on the project instance... although we should not forget about YAGNI |
Problem with that one is that it's empty by default (unless you're setting up I can foresee 2 alternatives (env var name apart, just the concept):
Ciao :-) |
On my "anonymous" instance But you are right re duplication. |
…r run. MOODLE_DOCKER_RUNNING=1 is available inside webserver continer, this can be used to conditionally load test configuration. Closes moodlehq#285
They cause a fatal error. See moodlehq#285.
The docs added as part of this issue are not correct, in fact if used verbatim they will cause a fatal error on a site using standard config.php file:
#289 for your consideration |
…r run. MOODLE_DOCKER_RUNNING=1 is available inside webserver continer, this can be used to conditionally load test configuration. Closes moodlehq#285 # Conflicts: # base.yml
I am currently using a snippet in Moodle
config.php
to override my dev configuration when code is tested in moodle-docker:I am wondering, if it would be beneficial to add a dedicated env var
MOODLE_DOCKER
that would act as flag (always set to 1) that code is run in moodle-docker for the cases like above? Alternative suggestions (e.g. how you overcome the same problem) are welcome.The text was updated successfully, but these errors were encountered: