Develop moodle Resources:
https://github.com/moodlehq/moodle-docker https://github.com/moodlehq https://hub.docker.com/r/moodlehq/moodle-php-apache The following setup can be used to set up a moodle development environment, with rootless podman:
# D-MATH link podman-compose ln -s /usr/bin/podman-compose ~/bin/docker-compose # D-MATH clone moodle-docker repo git clone https://github.com/moodlehq/moodle-docker.git cd moodle-docker # D-MATH set variables export MOODLE_DOCKER_DB_PORT=15432 export MOODLE_DOCKER_APP_VERSION=18080 export MOODLE_DOCKER_SELENIUM_VNC_PORT=15900 export MOODLE_DOCKER_WEB_PORT=18000 # Change ./moodle to your /path/to/moodle if you already have it checked out export MOODLE_DOCKER_WWWROOT=./moodle # D-MATH add custom configuration cat <<EOF > local.yml services: webserver: volumes: - "${MOODLE_DOCKER_WWWROOT}/../moodledata:/var/www/moodledata" db: environment: PGDATA: /var/lib/postgresql/data/pgdata volumes: - "${MOODLE_DOCKER_WWWROOT}/../database:/var/lib/postgresql/data" EOF # Choose a db server (Currently supported: pgsql, mariadb, mysql, mssql, oracle) export MOODLE_DOCKER_DB=pgsql # D-MATH creating files with group access for moodle code umask 007 # Get Moodle code, you could select another version branch (skip this if you already got the code) git clone -b MOODLE_404_STABLE git://git.moodle.org/moodle.git $MOODLE_DOCKER_WWWROOT # D-MATH add folder for moodle data mkdir moodledata mkdir database # D-MATH setgid for automatic setting group permission chmod 2770 moodle chmod 2770 moodledata chmod 2770 database # Ensure customized config.php for the Docker containers is in place cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php # D-MATH set the permission to 33 inside the container for moodle code podman unshare chown 33 -R moodle podman unshare chown 33 -R moodledata podman unshare chown 999 -R database # Start up containers, choose docker.io to download the images bin/moodle-docker-compose up -d # Shut down and destroy containers #bin/moodle-docker-compose down Above we set the webserver port to 18000 so this means you now need to connect to http://localhost:18000 in your browser to see the application.
...