This directory contains the docker setup to run an instance of Moodle 3.11. A number of containers are created as follows
Most relevent variables for versions, pod names, etc. can be found in example.env file.
The main configuration is setup in the file docker-compose.yml. Each service is a container and the compose file gives the various configuration details for that service. The volumes directives map paths inside the containers to local paths. Note that local paths are relative to the directory with the compose file. There are no absolute paths.
PHP is slightly more complicated. The default PHP image doesn't have all the extensions we need. We therefore have a PHP.Dockerfile referenced by the compose file. This tells docker to build a new image using these instructions. As PHP sits on a very limited Debian Linux instance most of this such be fairly obvious. Note that the confiuration files (e.g php.ini) are in the local folder and copied there on the build.
The Moodle program and data files are mapped to local directories under this folder so you can access them as normal without worrying about the containers.
Network host names are the same as the service names (e.g. just 'redis')
docker-compose build --no-cache docker-compose -p moodle up -d --env-file ./example.env
Deployment to OpenShift is handled using GitHub Actions. The workflow is defined in .github/workflows/deploy-branch.yml. Build / deploy notifications to Rocket.Chat are addressed in .github/workflows/notify-rocket-chat.yml.
act -s GITHUB_TOKEN="$(gh auth token)" --env-file example.env --secret-file example.secrets -W './.github/workflows/build-push-php-image.yml'