This is the current docker-based development environment.
- easy provisioning of new development instances (simple commands to create a docker-compose configuration for a given Moodle Git repository
- data separation between instances (no one can accidentally conflict with / overwrite another)
- selective starting and stopping of development instances (esp.: memory of my development machine is not polluted with an always-running postgres server)
- prevention of clashing namespaces
- Create a dedicated folder that will contain all instances. Mine is located at
~/Moodledocker. - Within that folder, clone this repository into a folder called
Metafiles:git clone https://github.com/learnweb/moodledocker.git Metafiles. - Create a symbolic link to Moodledocker/Scripts/moodledocker, e.g.
ln -s ~/Moodledocker/Metafiles/Scripts/moodledocker ~/bin/moodledocker. - Also, clone a customised nginx-proxy that will manage redirection to the correct instance:
git clone https://github.com/learnweb/moodledocker-nginx-proxy.git. - Enter
nginx-proxyand build the image:docker build -t jwilder/nginx-proxy ..
- Check out a Moodle git respository somewhere (NOT below
~/Moodledocker!). - Choose a name
NAMEthat you recognise. Navigate into the repository and entermoodledocker createhere NAME. That command will create the necessary files and folder structure. It will also create aconfig.phpfor you, if you like (on first start, you should!). - Start the instance by invoking
moodledocker control NAME up. If the nginx proxy server is not running yet, the output will tell you how to start it.