Switch to PHP 8.3-FPM + nginx single-container image - #13
Open
jwarnier wants to merge 2 commits into
Open
Conversation
Replace the dead PHP 5 / ubuntu 14.04 image (which cannot run the current Symfony 7 / PHP 8 LMS) with a single-container image: - PHP 8.3-FPM (www pool on 127.0.0.1:9000) - nginx (HTTP :80) serving statics + proxying .php to FPM - LMS source fetched at build time at a pinned ref (CHAMILO_LMS_REF), not vendored — keeps this repo slim and the image reproducible - memory_limit=-1 so Symfony's assets:install doesn't OOM - git dropped (all Composer deps ship zip dists) Compose (from our local setup): chamilo + MariaDB 11 + Redis 7, with DATABASE_* env names the LMS actually reads. Adds docker-compose.yml, entrypoint.sh, nginx.conf; removes the obsolete Apache vhost (000-default.conf); rewrites README/SETUP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current image is PHP 5 on ubuntu:14.04 pinned to v1.10.0-alpha — it cannot run the current (Symfony 7 / PHP 8) LMS,
SETUP.mdreferences adocker-compose.ymlthat isn't in the repo, and the Apache vhost points at a Chamilo 2 path that doesn't match the Dockerfile. This PR switches the repo to a working, modern image.What
A single container running PHP 8.3-FPM + nginx, serving the LMS over HTTP on :80 (nginx → FPM on 127.0.0.1:9000). The LMS source is fetched at build time at a pinned ref (
CHAMILO_LMS_REFbuild arg), not vendored — the repo stays slim and the image reproducible.Files
Dockerfile— PHP 8.3-FPM base, fetches LMS atCHAMILO_LMS_REF, installs Composer deps + nginx, setsmemory_limit=-1(Symfonyassets:installOOMs at the 128 M default), dropsgit(all deps ship zip dists).nginx.conf— Symfony front controller → FPM; statics direct; dotfiles denied.entrypoint.sh— startsphp-fpmthenexec nginx(PID 1).docker-compose.yml—chamilo+ MariaDB 11 + Redis 7, withDATABASE_*env (the names the LMS reads — notDB_*).README.md/SETUP.md— rewritten to match the real workflow.AGENTS.md— agent playbook: build/run/verify workflow + gotchas (memory_limitOOM, nested-.gitbloat,DATABASE_*vsDB_*, FPM port, no-TLS, slim-repo rule).000-default.conf— removed (obsolete Apache vhost).Verified
assets:installsucceeds, nginx installed./returns 302 (Symfony installer redirect) — proves nginx → FPM → PHP → Symfony is wired.Notes
chamilo/chamilo-lmsmaster SHA (newer than the latest tag) to reproduce the current tree. BumpCHAMILO_LMS_REFto a release tag for a public release.