- xdebug is disabled by default
- there's no database container; use another
extra_hosts
indocker-compose.yml
should point to it
- create a project tree with moodle structure in ~/projects (eg. moodle35.test), and in there:
git checkout
a moodle branch in folderhtdocs
mkdir moodledata
- checkout this repo in your docker folder (eg.
~/docker/moodle35
) cd ~/docker/moodle35
and copy.env-dist
to.env
and setCOMPOSE_PROJECT_NAME
(eg. moodle35)docker-compose up -d
builds and starts the Moodle environment- add
127.0.0.1 moodle35.test
in/etc/htdocs
You can set the moodle cron from your (linux) host!
* * * * * docker exec projectname_php-fpm php /var/www/html/admin/cli/cron.php > /dev/null
where projectname_php-fpm
is the name of your container. (check docker ps
)
- use
crontab -e
as yourself, NOT withsudo
- any cron request will frustrate an xdebug session by making a new request. Before starting debug sessions STOP YOUR CRON!