Currently, when /var/www/html is mounted as a named volume (e.g. moodlehtml:/var/www/html), upgrading between Moodle versions requires manually removing the volume to replace the old application code. This can be error-prone and risky for less experienced users, especially if they are not aware of the difference between moodledata and moodlehtml.
Suggestion:
Implement a structure where only essential persistent files (e.g. config.php and plugin/theme folders) are stored in the moodlehtml volume, while the rest of the Moodle core files are kept in the container. This would allow:
- Safe upgrades by simply changing the image tag (e.g.
v5.0.1 → v5.0.2) without having to manually remove the entire HTML volume.
- Keeping site-specific customizations (plugins, themes,
config.php) across upgrades.
- Avoiding leftover outdated core code files after switching to a new container version.
Potential approach:
This would simplify maintenance and reduce the risk of accidentally running old Moodle code after an upgrade.
Related to: #1 and #102
Currently, when
/var/www/htmlis mounted as a named volume (e.g.moodlehtml:/var/www/html), upgrading between Moodle versions requires manually removing the volume to replace the old application code. This can be error-prone and risky for less experienced users, especially if they are not aware of the difference betweenmoodledataandmoodlehtml.Suggestion:
Implement a structure where only essential persistent files (e.g.
config.phpand plugin/theme folders) are stored in themoodlehtmlvolume, while the rest of the Moodle core files are kept in the container. This would allow:v5.0.1→v5.0.2) without having to manually remove the entire HTML volume.config.php) across upgrades.Potential approach:
Split
/var/www/htmlso that the volume mounts only:/var/www/html/config.php/var/www/html/theme/*(custom themes)/var/www/html/mod/*(custom modules)Everything else remains inside the container and is replaced automatically on image update.
This would simplify maintenance and reduce the risk of accidentally running old Moodle code after an upgrade.
Related to: #1 and #102