mail Niels.Gandrass@haw-hamburg.de
globe https://gandrass.de
Annual Conference of the Moodle an Hochschulen e.V.
Rosenheim Technical University of Applied Sciences
2026-03-03
How we were doing it back in the days and why we are doing it differently now
The platform was a small project and not yet widely used by university members
The platform grew but we were still far from todays usage numbers
Nonetheless we needed to address many of the previously discussed problems
We now had multiple growing Moodle deployments, creating a lot of maintenance work for us
Containers
🐋
We do not have the time to show you each and every custom shell script or Dockerfile we created, but we will walk you through the whole architecture so that you know where to start when you want to do this yourself!
Moving everything into containers for ease of use and flexibility with re-use in mind
Moodle, plugin, and software updates were still manual and this needed to change
This resulted in the following application stack ...
.env file
# vvvvv MOODLE_405_STABLE, release 4.5.9 vvvvv
MOODLE_GIT_HEAD=6b4d33a98f43ac19f1a37952467c8fbc722d0bdb
MOODLE_PLUGIN_QTYPE_STACK_GIT_HEAD=tags/v4.11.1
MOODLE_PLUGIN_QUIZ_ARCHIVER_GIT_HEAD=tags/v3.2.0
MOODLE_PLUGIN_THEME_BOOSTUNION_GIT_HEAD=tags/v4.5-r32
MOODLE_PLUGIN_USERAUTODELETE_GIT_HEAD=tags/v1.5.0
GOEMAXIMA_STACK_VERSION=2026010500
GOEMAXIMA_VERSION=1.2.0
QUIZ_ARCHIVE_WORKER_VERSION=3.3.9
Excerpt of an example mymoodle.env file
.env file
# Selection of software versions
PHP_FPM_VERSION=8.3
POSTGRES_VERSION=18-alpine
CLAMAV_VERSION=latest
# Service-specific settings
BACKUP_COMPRESS=1
BACKUP_CPU_THREADS=8
MOODLE_ALLOW_USER_CREATION_ON_RESTORE=false
MOODLE_DATABASE_NAME=myawesomemoodle
Excerpt of an example mymoodle.env file
docker-compose.ymldocker compose up command
# Selection of services to run
COMPOSE_PROFILES=moodle,database,redis,shibboleth-sp
Excerpt of an example mymoodle.env file
This example is used for local development of the Quiz Archiver plugin
Effortlessly create fully-compatible production, staging, test, and development deployments
Using the same Docker stack for multiple different Moodle deployments
|
![]() Example of multiple environments |
Using GitLab CI to always have the latest container images at hand
Finally letting the server do the work for us!
|
![]() Example of a full build |
Only images that faced changes are built for speedup and resource conservation
|
|
|
![]() Docker images in GitLab registry |
Versioning your deployments, getting the code out there, and migrating Moodle
$ git commit -m "My plugin release!"
$ git tag v3.2.0
$ git push --tags
.env file
MOODLE_PLUGIN_BLOCK_SYNTAXHELP_GIT_HEAD=tags/v2.3.2
-MOODLE_PLUGIN_MOD_QUIZ_ARCHIVER_GIT_HEAD=tags/v3.1.4
+MOODLE_PLUGIN_MOD_QUIZ_ARCHIVER_GIT_HEAD=tags/v3.2.0
MOODLE_PLUGIN_THEME_EASSESSMENT_GIT_HEAD=tags/v1.1.5
-# vvvvv MOODLE_405_STABLE, release 4.5.8+ vvvvv
-MOODLE_CORE_GIT_HEAD=23ad73ee5677a0d0bf1039182a4e87868d4ccdf5
+# vvvvv MOODLE_405_STABLE, release 4.5.9 vvvvv
+MOODLE_CORE_GIT_HEAD=6b4d33a98f43ac19f1a37952467c8fbc722d0bdb
.env file (or "copy & paste")
$ vim -d eassessment-staging.env eassessment.env
$ git commit -m "eassessment: Apply staged changes"
$ git commit -m "Release version 2026030200"
$ git tag 2026030200
$ git push --tags
Your production build is now at the exact state of your staging build
$ ./pull.sh myenvironment
$ ./update.sh myenvironment
3. Let Moodle finish the database migration (if any)
In our case, step 2 & 3 usually complete in under 60 seconds!
That was a lot of information in a short amount of time ...
Further information to dig deeper
Click on a link to open open_in_browser
Now it's time for your questions!
You can find all slides of this talk at
globe https://gandrass.de