Skip to content

tiementuinstra/docker-moodle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Moodle environment

notes

  • xdebug is disabled by default
  • there's no database container; use another
    • extra_hosts in docker-compose.yml should point to it

Create a Moodle instance

  1. create a project tree with moodle structure in ~/projects (eg. moodle35.test), and in there:
  • git checkout a moodle branch in folder htdocs
  • mkdir moodledata
  1. checkout this repo in your docker folder (eg. ~/docker/moodle35)
  2. cd ~/docker/moodle35 and copy .env-dist to .env and set COMPOSE_PROJECT_NAME (eg. moodle35)
  3. docker-compose up -d builds and starts the Moodle environment
  4. add 127.0.0.1 moodle35.test in /etc/htdocs

CRON

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)

Important notes:

  • use crontab -e as yourself, NOT with sudo
  • any cron request will frustrate an xdebug session by making a new request. Before starting debug sessions STOP YOUR CRON!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published