Problem
The Moodle 5.1.x integration CI leg (added in #62) consistently fails to boot its container: the readiness check logs Couldn't connect to server / Recv failure: Connection reset by peer for the entire wait window and ends with Moodle did not become ready in time — no tests ever run. The established 4.5.5 and 5.0.1 legs boot fine. The 5.2.1 image showed the same symptom earlier. This red leg now blocks every PR.
Root cause
From the container image entrypoint (erseco/alpine-moodle, rootfs/docker-entrypoint-init.d/02-configure-moodle.sh):
Since Moodle 5.1, all web-accessible files are located inside the /public directory.
For Moodle 5.1+ the entrypoint detects /var/www/html/public, rewrites the nginx docroot to /var/www/html/public, and runs composer install at startup. First boot is therefore substantially slower and heavier than for 4.5.x/5.0.x.
On top of that, docker-compose.yml mounts an empty named volume at moodlehtml:/var/www/html. On first boot Docker copies the image's entire /var/www/html tree into that volume before the app is usable — and for 5.1 that tree is larger (public/ + composer vendor/). The copy + composer install exceed even the extended 10-minute readiness window, so the container never reports ready.
Fix
- Drop the
moodlehtml:/var/www/html volume from docker-compose.yml. A CI container runs exactly once (no restart), so persisting the code tree across restarts provides no benefit there; the image is self-contained. Removing it eliminates the slow first-boot image→volume copy entirely. moodledata (uploads/sessions) is kept. This has zero effect on a single CI run's correctness and only changes cross-restart code persistence for local dev, where the code is already sourced from the image on every boot.
- Dump
docker compose logs on readiness timeout in the Makefile upd target, so any future boot failure is diagnosable from the CI log instead of an opaque "did not become ready".
Non-goals
- Do not change the Moodle image itself (upstream
erseco/alpine-moodle).
- Do not drop the
moodledata volume.
- Do not touch application code or the test suite.
Test plan
Infra-only change (docker-compose + Makefile); no unit-test surface. Verification is the CI integration matrix itself: the 5.1.x leg must boot and run tests (not time out), and 4.5.5/5.0.1 must remain green.
Acceptance criteria
Problem
The Moodle 5.1.x integration CI leg (added in #62) consistently fails to boot its container: the readiness check logs
Couldn't connect to server/Recv failure: Connection reset by peerfor the entire wait window and ends withMoodle did not become ready in time— no tests ever run. The established 4.5.5 and 5.0.1 legs boot fine. The 5.2.1 image showed the same symptom earlier. This red leg now blocks every PR.Root cause
From the container image entrypoint (
erseco/alpine-moodle,rootfs/docker-entrypoint-init.d/02-configure-moodle.sh):For Moodle 5.1+ the entrypoint detects
/var/www/html/public, rewrites the nginx docroot to/var/www/html/public, and runscomposer installat startup. First boot is therefore substantially slower and heavier than for 4.5.x/5.0.x.On top of that,
docker-compose.ymlmounts an empty named volume atmoodlehtml:/var/www/html. On first boot Docker copies the image's entire/var/www/htmltree into that volume before the app is usable — and for 5.1 that tree is larger (public/+ composervendor/). The copy + composer install exceed even the extended 10-minute readiness window, so the container never reports ready.Fix
moodlehtml:/var/www/htmlvolume fromdocker-compose.yml. A CI container runs exactly once (no restart), so persisting the code tree across restarts provides no benefit there; the image is self-contained. Removing it eliminates the slow first-boot image→volume copy entirely.moodledata(uploads/sessions) is kept. This has zero effect on a single CI run's correctness and only changes cross-restart code persistence for local dev, where the code is already sourced from the image on every boot.docker compose logson readiness timeout in theMakefileupdtarget, so any future boot failure is diagnosable from the CI log instead of an opaque "did not become ready".Non-goals
erseco/alpine-moodle).moodledatavolume.Test plan
Infra-only change (docker-compose + Makefile); no unit-test surface. Verification is the CI integration matrix itself: the 5.1.x leg must boot and run tests (not time out), and 4.5.5/5.0.1 must remain green.
Acceptance criteria
moodlehtmlvolume removed fromdocker-compose.yml(mount + declaration); YAML still valid.Makefileupdprints recentmoodlecontainer logs on readiness timeout.