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

Remove MongoDB #165

Merged
merged 2 commits into from
Mar 16, 2023
Merged

Remove MongoDB #165

merged 2 commits into from
Mar 16, 2023

Conversation

andrewnicols
Copy link
Contributor

This change removes MongoDB from our build.

This change is only suitable for PHP 8.2, because older versions of PHP are used in older versions of Moodle where MongoDB still exists. We support MongoDB for Moodle 4.1 and older.

@andrewnicols
Copy link
Contributor Author

Note: This issue is based on #163

@andrewnicols andrewnicols force-pushed the remove_old_deps branch 3 times, most recently from 4ca41f9 to f5dc26d Compare March 15, 2023 04:29
@andrewnicols
Copy link
Contributor Author

Note: I considered removing the memcached extension too, but opted not to because memcached actually has a usage, whilst mongodb is fricking useless in our case.

This change makes it much faster to make smaller changes to the image
by:
- moving the ADD commands to more targeted additions in order of build
  size
- breaking out the Oracle and sqlsrv builds into their own ADD and RUN
  sections in the Dockerfile
- moving the addition of non build-related files to right at the end of
  the Dockerfile

These changes mean that it is possible to more easily developer the
image, for example:
- you can now make changes to files within the /usr directory without
  recompiling all PHP extensions
- you can now iterate on the Oracle and/or sqlsrv extensions without
  recompiling all PHP extensinos
- you can now iterate on the sqlsrv extension, without recompiling all
  PHP extensions

Whist this has little effect on the end image, or the build process
within CI systems, local development is substantially improved (unless
you're making changes to the php-extensions.sh script).
From Moodle 4.2 we no longer include MongoDB, and we add support for PHP
8.2 (or will do soon). Therefore we can drop the inclusion of the
MongoDB extension *for PHP 8.2 and up only*.
@stronk7 stronk7 merged commit b532e39 into moodlehq:master Mar 16, 2023
@stronk7
Copy link
Member

stronk7 commented Mar 16, 2023

Sold! (applying to the the 2 php82 images now...)

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.

2 participants