├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── docker-buildtest.yml │ └── docker-release.yml ├── Dockerfile ├── README.md ├── docker-compose.yml ├── foreground.sh ├── moodle-config.php ├── moodle_variables.env └── moodlecron /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team through GitHub. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Hello there! Glad you want to contribute to the Docker-Moodle project! This document will help answer common questions you may have during your first contribution. 4 | 5 | ## Code of Conduct 6 | 7 | This repository adopts the Contributor Covenant Code of Conduct and should be reviewed before contributing. 8 | 9 | ## Submitting Issues 10 | 11 | Not every contribution comes in the form of code. Submitting, confirming, and triaging issues is an important task for any project. 12 | 13 | Issues submitted to this repository are only for the docker image it represents. Issues for the underlying software `moodle` need to be submitted through the [Moodle Tracker.](https://tracker.moodle.org/secure/Dashboard.jspa) 14 | 15 | ## Commit Signing Required 16 | 17 | This repository requires commits to be signed. For more informaiton on configuring your local client for this, please reference the following: 18 | 19 | 1. [Git - Got-Tools-Signing-Your-Work](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work) 20 | 2. [Github - Signing-Commits](https://help.github.com/articles/signing-commits/) 21 | 3. [Yubikey Git Signing](https://developers.yubico.com/PGP/Git_signing.html) 22 | 23 | ## Contribution Process 24 | 25 | The following are the general steps for a contribution: 26 | 27 | 1. Commit changes to a git branch, making sure to use commit signing. 28 | 2. Create a GitHub Pull Request for your change, following the instructions in the pull request template. 29 | 30 | ### Pull Request Requirements 31 | 32 | The following requirements exist for pull requests: 33 | 34 | 1. Commits are signed. 35 | 2. PR follows template. 36 | 3. CI build and tests pass. 37 | 4. Codacy Quality Review passes. 38 | 39 | ### Code Review Process 40 | 41 | Code review takes place in GitHub pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with GitHub Pull Requests. 42 | 43 | Once you open a pull request, a code review will take place within the files changed of your PR. An approval, comment, or request for changes will be responded on the PR to further the request. 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Describe the issue** 2 | A clear and concise description of what the bug is. 3 | 4 | **To Reproduce** 5 | Steps to reproduce the behavior: 6 | 7 | **Expected behavior** 8 | A clear and concise description of what you expected to happen. 9 | 10 | **Screenshots** 11 | If applicable, add screenshots to help explain your problem. 12 | 13 | **Docker Version (please complete the following information):** 14 | - OS: [e.g. Ubuntu or Windows] 15 | - OS Version [e.g. 22] 16 | - Docker Version [e.g. 18.06.1-ce] 17 | - Tag name of image if pulled from Docker Hub. [e.g. v3.1] 18 | 19 | **Additional context** 20 | Add any other context about the problem here. 21 | Production, or testing. 22 | Deploying using an orchestrator? 23 | Deploying behind a load balancer? 24 | etc. 25 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Please describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves, link to appropriate issues or other sources.] 8 | 9 | ### Check List 10 | 11 | - [ ] Image buildes successfully. 12 | - [ ] Image runs and service can be opened successfully. 13 | - [ ] All tests pass where applicable. 14 | - [ ] README.md updated where appropriate. 15 | - [ ] All commits have been signed. -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: docker 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "11:00" 8 | open-pull-requests-limit: 10 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/docker-buildtest.yml: -------------------------------------------------------------------------------- 1 | name: Docker PR Build and Test 2 | 3 | on: 4 | pull_request: 5 | branches: [ master ] 6 | 7 | jobs: 8 | 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Build the Docker image 14 | id: docker_build 15 | uses: docker/build-push-action@v3 16 | with: 17 | push: false 18 | tags: moodle:latest 19 | 20 | - name: Run Snyk to check for vulnerabilities 21 | uses: snyk/actions/docker@master 22 | continue-on-error: true 23 | env: 24 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} 25 | with: 26 | command: monitor 27 | image: moodle:latest -------------------------------------------------------------------------------- /.github/workflows/docker-release.yml: -------------------------------------------------------------------------------- 1 | name: Docker Release 2 | on: 3 | release: 4 | types: [published] 5 | 6 | jobs: 7 | push_to_registry: 8 | name: Push Docker image to Docker Hub 9 | runs-on: ubuntu-latest 10 | permissions: 11 | packages: write 12 | contents: read 13 | steps: 14 | - name: Check out the repo 15 | uses: actions/checkout@v3 16 | 17 | - name: Log in to Docker Hub 18 | uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a 19 | with: 20 | username: ${{ secrets.DOCKER_USERNAME }} 21 | password: ${{ secrets.DOCKER_PASSWORD }} 22 | 23 | - name: Log in to the Container registry 24 | uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a 25 | with: 26 | registry: ghcr.io 27 | username: ${{ github.actor }} 28 | password: ${{ secrets.GITHUB_TOKEN }} 29 | 30 | - name: Extract metadata (tags, labels) for Docker 31 | id: meta 32 | uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea 33 | with: 34 | images: | 35 | jhardison/moodle 36 | ghcr.io/${{ github.repository }} 37 | 38 | - name: Build and push Docker image 39 | uses: docker/build-push-action@v3 40 | with: 41 | context: . 42 | push: true 43 | tags: ${{ steps.meta.outputs.tags }} 44 | labels: ${{ steps.meta.outputs.labels }} -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Docker-Moodle 2 | # Dockerfile for moodle instance. more dockerish version of https://github.com/sergiogomez/docker-moodle 3 | # Forked from Jade Auer's docker version. https://github.com/jda/docker-moodle 4 | FROM ubuntu:20.04 5 | LABEL maintainer="Jonathan Hardison " 6 | 7 | VOLUME ["/var/moodledata"] 8 | EXPOSE 80 443 9 | COPY moodle-config.php /var/www/html/config.php 10 | 11 | # Let the container know that there is no tty 12 | ENV DEBIAN_FRONTEND noninteractive 13 | 14 | # Database info and other connection information derrived from env variables. See readme. 15 | # Set ENV Variables externally Moodle_URL should be overridden. 16 | ENV MOODLE_URL http://127.0.0.1 17 | 18 | # Enable when using external SSL reverse proxy 19 | # Default: false 20 | ENV SSL_PROXY false 21 | 22 | COPY ./foreground.sh /etc/apache2/foreground.sh 23 | 24 | RUN apt-get update && apt-get upgrade -y && \ 25 | apt-get -y install mysql-client pwgen python-setuptools curl git unzip apache2 php \ 26 | php-gd libapache2-mod-php postfix wget supervisor php-pgsql curl libcurl4 \ 27 | libcurl3-dev php-curl php-xmlrpc php-intl php-mysql git-core php-xml php-mbstring php-zip php-soap cron php-ldap && \ 28 | cd /tmp && \ 29 | git clone -b MOODLE_400_STABLE git://git.moodle.org/moodle.git --depth=1 && \ 30 | mv /tmp/moodle/* /var/www/html/ && \ 31 | rm /var/www/html/index.html && \ 32 | chown -R www-data:www-data /var/www/html && \ 33 | chmod +x /etc/apache2/foreground.sh 34 | 35 | #cron 36 | COPY moodlecron /etc/cron.d/moodlecron 37 | RUN chmod 0644 /etc/cron.d/moodlecron 38 | 39 | # Enable SSL, moodle requires it 40 | RUN a2enmod ssl && a2ensite default-ssl #if using proxy dont need actually secure connection 41 | 42 | # Cleanup, this is ran to reduce the resulting size of the image. 43 | RUN apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/* /var/lib/cache/* /var/lib/log/* 44 | 45 | ENTRYPOINT ["/etc/apache2/foreground.sh"] 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-moodle 2 | ============= 3 | [![Docker Release](https://github.com/jmhardison/docker-moodle/actions/workflows/docker-release.yml/badge.svg)](https://github.com/jmhardison/docker-moodle/actions/workflows/docker-release.yml) 4 | 5 | Cross published at [github.](https://github.com/jmhardison/docker-moodle/pkgs/container/docker-moodle) 6 | 7 | A Dockerfile that installs and runs the latest Moodle stable, with external MySQL Database. 8 | 9 | `Note: DB Deployment uses version 5 of MySQL. MySQL:Latest is now v8.` 10 | 11 | Tags: 12 | * latest - 4.0 stable 13 | * v4.0 - 4.0 stable 14 | * v3.11 - 3.11 stable 15 | * v3.8 - 3.8 stable 16 | * v3.7 - 3.7 stable 17 | * v3.6 - 3.6 stable 18 | * v3.5 - 3.5 stable 19 | * v3.4 - 3.4 stable 20 | * v3.3 - 3.3 stable 21 | * v3.2 - 3.2 stable 22 | * v3.1 - 3.1 stable 23 | 24 | ## Installation 25 | 26 | ``` 27 | git clone https://github.com/jmhardison/docker-moodle 28 | cd docker-moodle 29 | docker build -t moodle . 30 | ``` 31 | 32 | ## Usage 33 | 34 | Test Environment 35 | 36 | When running locally or for a test deployment, use of localhost is acceptable. 37 | 38 | To spawn a new instance of Moodle: 39 | 40 | ``` 41 | docker run -d --name DB -p 3306:3306 -e MYSQL_DATABASE=moodle -e MYSQL_ROOT_PASSWORD=moodle -e MYSQL_USER=moodle -e MYSQL_PASSWORD=moodle mysql:5 42 | docker run -d -P --name moodle --link DB:DB -e MOODLE_URL=http://localhost:8080 -p 8080:80 jhardison/moodle 43 | ``` 44 | 45 | You can visit the following URL in a browser to get started: 46 | 47 | ``` 48 | http://localhost:8080 49 | ``` 50 | 51 | ### Production Deployment 52 | 53 | For a production deployment of moodle, use of a FQDN is advised. This FQDN should be created in DNS for resolution to your host. For example, if your internal DNS is company.com, you could leverage moodle.company.com and have that record resolve to the host running your moodle container. The moodle url would then be, `MOODLE_URL=http://moodle.company.com` 54 | In the following steps, replace MOODLE_URL with your appropriate FQDN. 55 | 56 | In some cases when you are using an external SSL reverse proxy, you should enable `SSL_PROXY=true` variable. 57 | 58 | * Deploy With Docker 59 | ``` 60 | docker run -d --name DB -p 3306:3306 -e MYSQL_DATABASE=moodle -e MYSQL_ROOT_PASSWORD=moodle -e MYSQL_USER=moodle -e MYSQL_PASSWORD=moodle mysql:5 61 | docker run -d -P --name moodle --link DB:DB -e MOODLE_URL=http://moodle.company.com -p 80:80 jhardison/moodle 62 | ``` 63 | 64 | * Deploy with Docker Compose 65 | 66 | Pull the latest source from GitHub: 67 | ``` 68 | git clone https://github.com/jmhardison/docker-moodle.git 69 | ``` 70 | 71 | Update the `moodle_variables.env` file with your information. Please note that we are using v3 compose files, as a stop gap link env variable are manually filled since v3 no longer automatically fills those for use. 72 | 73 | Once the environment file is filled in you may bring up the service with: 74 | `docker-compose up -d` 75 | 76 | 77 | 78 | ## Caveats 79 | The following aren't handled, considered, or need work: 80 | * moodle cronjob (should be called from cron container) 81 | * log handling (stdout?) 82 | * email (does it even send?) 83 | 84 | ## Credits 85 | 86 | This is a fork of [Jade Auer's](https://github.com/jda/docker-moodle) Dockerfile. 87 | This is a reductionist take on [sergiogomez](https://github.com/sergiogomez/)'s docker-moodle Dockerfile. 88 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | dbapp: 5 | image: mysql:5 6 | restart: always 7 | volumes: 8 | - db-volume:/var/lib/mysql 9 | env_file: 10 | - moodle_variables.env 11 | networks: 12 | - backendDB 13 | deploy: 14 | replicas: 1 15 | restart_policy: 16 | condition: on-failure 17 | moodleapp: 18 | image: jhardison/moodle:latest 19 | links: 20 | - dbapp:DB 21 | depends_on: 22 | - dbapp 23 | restart: always 24 | volumes: 25 | - moodleapp-data:/var/moodledata 26 | ports: 27 | - 80:80 28 | - 443:443 29 | env_file: 30 | - moodle_variables.env 31 | networks: 32 | - backendDB 33 | - frontendWEB 34 | deploy: 35 | replicas: 1 36 | restart_policy: 37 | condition: on-failure 38 | 39 | volumes: 40 | db-volume: 41 | moodleapp-data: 42 | 43 | networks: 44 | backendDB: 45 | frontendWEB: -------------------------------------------------------------------------------- /foreground.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "placeholder" > /var/moodledata/placeholder 4 | chown -R www-data:www-data /var/moodledata 5 | chmod 777 /var/moodledata 6 | 7 | read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat 8 | trap "kill -TERM -$pgrp; exit" EXIT TERM KILL SIGKILL SIGTERM SIGQUIT 9 | 10 | #start up cron 11 | /usr/sbin/cron 12 | 13 | 14 | source /etc/apache2/envvars 15 | tail -F /var/log/apache2/* & 16 | exec apache2 -D FOREGROUND 17 | -------------------------------------------------------------------------------- /moodle-config.php: -------------------------------------------------------------------------------- 1 | dbtype = 'mysqli'; // 'pgsql', 'mariadb', 'mysqli', 'mssql', 'sqlsrv' or 'oci' 42 | $CFG->dblibrary = 'native'; // 'native' only at the moment 43 | $CFG->dbhost = getenv('DB_PORT_3306_TCP_ADDR'); // eg 'localhost' or 'db.isp.com' or IP 44 | $CFG->dbname = getenv('DB_ENV_MYSQL_DATABASE'); // database name, eg moodle 45 | $CFG->dbuser = getenv('DB_ENV_MYSQL_USER'); // your database username 46 | $CFG->dbpass = getenv('DB_ENV_MYSQL_PASSWORD'); // your database password 47 | $CFG->prefix = 'mdl_'; // prefix to use for all table names 48 | $CFG->dboptions = array( 49 | 'dbpersist' => false, // should persistent database connections be 50 | // used? set to 'false' for the most stable 51 | // setting, 'true' can improve performance 52 | // sometimes 53 | 'dbsocket' => false, // should connection via UNIX socket be used? 54 | // if you set it to 'true' or custom path 55 | // here set dbhost to 'localhost', 56 | // (please note mysql is always using socket 57 | // if dbhost is 'localhost' - if you need 58 | // local port connection use '127.0.0.1') 59 | 'dbport' => getenv('DB_PORT_3306_TCP_PORT'), // the TCP port number to use when connecting 60 | // to the server. keep empty string for the 61 | // default port 62 | 'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't 63 | // support advanced options on connection. 64 | // If you set those in the database then 65 | // the advanced settings will not be sent. 66 | 'dbcollation' => 'utf8mb4_unicode_ci', // MySQL has partial and full UTF-8 67 | // support. If you wish to use partial UTF-8 68 | // (three bytes) then set this option to 69 | // 'utf8_unicode_ci', otherwise this option 70 | // can be removed for MySQL (by default it will 71 | // use 'utf8mb4_unicode_ci'. This option should 72 | // be removed for all other databases. 73 | ); 74 | 75 | 76 | //========================================================================= 77 | // 2. WEB SITE LOCATION 78 | //========================================================================= 79 | // Now you need to tell Moodle where it is located. Specify the full 80 | // web address to where moodle has been installed. If your web site 81 | // is accessible via multiple URLs then choose the most natural one 82 | // that your students would use. Do not include a trailing slash 83 | // 84 | // If you need both intranet and Internet access please read 85 | // http://docs.moodle.org/en/masquerading 86 | 87 | $CFG->wwwroot = getenv('MOODLE_URL'); 88 | 89 | 90 | //========================================================================= 91 | // 3. DATA FILES LOCATION 92 | //========================================================================= 93 | // Now you need a place where Moodle can save uploaded files. This 94 | // directory should be readable AND WRITEABLE by the web server user 95 | // (usually 'nobody' or 'apache'), but it should not be accessible 96 | // directly via the web. 97 | // 98 | // - On hosting systems you might need to make sure that your "group" has 99 | // no permissions at all, but that "others" have full permissions. 100 | // 101 | // - On Windows systems you might specify something like 'c:\moodledata' 102 | 103 | $CFG->dataroot = '/var/moodledata'; 104 | 105 | 106 | //========================================================================= 107 | // 4. DATA FILES PERMISSIONS 108 | //========================================================================= 109 | // The following parameter sets the permissions of new directories 110 | // created by Moodle within the data directory. The format is in 111 | // octal format (as used by the Unix utility chmod, for example). 112 | // The default is usually OK, but you may want to change it to 0750 113 | // if you are concerned about world-access to the files (you will need 114 | // to make sure the web server process (eg Apache) can access the files. 115 | // NOTE: the prefixed 0 is important, and don't use quotes. 116 | 117 | $CFG->directorypermissions = 02777; 118 | 119 | 120 | //========================================================================= 121 | // 5. DIRECTORY LOCATION (most people can just ignore this setting) 122 | //========================================================================= 123 | // A very few webhosts use /admin as a special URL for you to access a 124 | // control panel or something. Unfortunately this conflicts with the 125 | // standard location for the Moodle admin pages. You can work around this 126 | // by renaming the admin directory in your installation, and putting that 127 | // new name here. eg "moodleadmin". This should fix all admin links in Moodle. 128 | // After any change you need to visit your new admin directory 129 | // and purge all caches. 130 | 131 | $CFG->admin = 'admin'; 132 | 133 | 134 | //========================================================================= 135 | // 6. OTHER MISCELLANEOUS SETTINGS (ignore these for new installations) 136 | //========================================================================= 137 | // 138 | // These are additional tweaks for which no GUI exists in Moodle yet. 139 | // 140 | // Starting in PHP 5.3 administrators should specify default timezone 141 | // in PHP.ini, you can also specify it here if needed. 142 | // See details at: http://php.net/manual/en/function.date-default-timezone-set.php 143 | // List of time zones at: http://php.net/manual/en/timezones.php 144 | // date_default_timezone_set('Australia/Perth'); 145 | // 146 | // Change the key pair lifetime for Moodle Networking 147 | // The default is 28 days. You would only want to change this if the key 148 | // was not getting regenerated for any reason. You would probably want 149 | // make it much longer. Note that you'll need to delete and manually update 150 | // any existing key. 151 | // $CFG->mnetkeylifetime = 28; 152 | // 153 | // Allow user passwords to be included in backup files. Very dangerous 154 | // setting as far as it publishes password hashes that can be unencrypted 155 | // if the backup file is publicy available. Use it only if you can guarantee 156 | // that all your backup files remain only privacy available and are never 157 | // shared out from your site/institution! 158 | // $CFG->includeuserpasswordsinbackup = true; 159 | // 160 | // Completely disable user creation when restoring a course, bypassing any 161 | // permissions granted via roles and capabilities. Enabling this setting 162 | // results in the restore process stopping when a user attempts to restore a 163 | // course requiring users to be created. 164 | // $CFG->disableusercreationonrestore = true; 165 | // 166 | // Keep the temporary directories used by backup and restore without being 167 | // deleted at the end of the process. Use it if you want to debug / view 168 | // all the information stored there after the process has ended. Note that 169 | // those directories may be deleted (after some ttl) both by cron and / or 170 | // by new backup / restore invocations. 171 | // $CFG->keeptempdirectoriesonbackup = true; 172 | // 173 | // Modify the restore process in order to force the "user checks" to assume 174 | // that the backup originated from a different site, so detection of matching 175 | // users is performed with different (more "relaxed") rules. Note that this is 176 | // only useful if the backup file has been created using Moodle < 1.9.4 and the 177 | // site has been rebuilt from scratch using backup files (not the best way btw). 178 | // If you obtain user conflicts on restore, rather than enabling this setting 179 | // permanently, try restoring the backup on a different site, back it up again 180 | // and then restore on the target server. 181 | // $CFG->forcedifferentsitecheckingusersonrestore = true; 182 | // 183 | // Prevent stats processing and hide the GUI 184 | // $CFG->disablestatsprocessing = true; 185 | // 186 | // Setting this to true will enable admins to edit any post at any time 187 | // $CFG->admineditalways = true; 188 | // 189 | // These variables define DEFAULT block variables for new courses 190 | // If this one is set it overrides all others and is the only one used. 191 | // $CFG->defaultblocks_override = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity'; 192 | // 193 | // These variables define the specific settings for defined course formats. 194 | // They override any settings defined in the formats own config file. 195 | // $CFG->defaultblocks_site = 'site_main_menu,course_list:course_summary,calendar_month'; 196 | // $CFG->defaultblocks_social = 'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list'; 197 | // $CFG->defaultblocks_topics = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity'; 198 | // $CFG->defaultblocks_weeks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity'; 199 | // 200 | // These blocks are used when no other default setting is found. 201 | // $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity'; 202 | // 203 | // You can specify a different class to be created for the $PAGE global, and to 204 | // compute which blocks appear on each page. However, I cannot think of any good 205 | // reason why you would need to change that. It just felt wrong to hard-code the 206 | // the class name. You are strongly advised not to use these to settings unless 207 | // you are absolutely sure you know what you are doing. 208 | // $CFG->moodlepageclass = 'moodle_page'; 209 | // $CFG->moodlepageclassfile = "$CFG->dirroot/local/myplugin/mypageclass.php"; 210 | // $CFG->blockmanagerclass = 'block_manager'; 211 | // $CFG->blockmanagerclassfile = "$CFG->dirroot/local/myplugin/myblockamanagerclass.php"; 212 | // 213 | // Seconds for files to remain in caches. Decrease this if you are worried 214 | // about students being served outdated versions of uploaded files. 215 | // $CFG->filelifetime = 60*60*6; 216 | // 217 | // Some web servers can offload the file serving from PHP process, 218 | // comment out one the following options to enable it in Moodle: 219 | // $CFG->xsendfile = 'X-Sendfile'; // Apache {@see https://tn123.org/mod_xsendfile/} 220 | // $CFG->xsendfile = 'X-LIGHTTPD-send-file'; // Lighttpd {@see http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file} 221 | // $CFG->xsendfile = 'X-Accel-Redirect'; // Nginx {@see http://wiki.nginx.org/XSendfile} 222 | // If your X-Sendfile implementation (usually Nginx) uses directory aliases specify them 223 | // in the following array setting: 224 | // $CFG->xsendfilealiases = array( 225 | // '/dataroot/' => $CFG->dataroot, 226 | // '/cachedir/' => '/var/www/moodle/cache', // for custom $CFG->cachedir locations 227 | // '/localcachedir/' => '/var/local/cache', // for custom $CFG->localcachedir locations 228 | // '/tempdir/' => '/var/www/moodle/temp', // for custom $CFG->tempdir locations 229 | // '/filedir' => '/var/www/moodle/filedir', // for custom $CFG->filedir locations 230 | // ); 231 | // 232 | // YUI caching may be sometimes improved by slasharguments: 233 | // $CFG->yuislasharguments = 1; 234 | // Some servers may need a special rewrite rule to work around internal path length limitations: 235 | // RewriteRule (^.*/theme/yui_combo\.php)(/.*) $1?file=$2 236 | // 237 | // 238 | // Following settings may be used to select session driver, uncomment only one of the handlers. 239 | // Database session handler (not compatible with MyISAM): 240 | // $CFG->session_handler_class = '\core\session\database'; 241 | // $CFG->session_database_acquire_lock_timeout = 120; 242 | // 243 | // File session handler (file system locking required): 244 | // $CFG->session_handler_class = '\core\session\file'; 245 | // $CFG->session_file_save_path = $CFG->dataroot.'/sessions'; 246 | // 247 | // Memcached session handler (requires memcached server and extension): 248 | // $CFG->session_handler_class = '\core\session\memcached'; 249 | // $CFG->session_memcached_save_path = '127.0.0.1:11211'; 250 | // $CFG->session_memcached_prefix = 'memc.sess.key.'; 251 | // $CFG->session_memcached_acquire_lock_timeout = 120; 252 | // $CFG->session_memcached_lock_expire = 7200; // Ignored if memcached extension <= 2.1.0 253 | // 254 | // Memcache session handler (requires memcached server and memcache extension): 255 | // $CFG->session_handler_class = '\core\session\memcache'; 256 | // $CFG->session_memcache_save_path = '127.0.0.1:11211'; 257 | // $CFG->session_memcache_acquire_lock_timeout = 120; 258 | // ** NOTE: Memcache extension has less features than memcached and may be 259 | // less reliable. Use memcached where possible or if you encounter 260 | // session problems. ** 261 | // 262 | // Please be aware that when selecting either Memcached or Memcache for sessions that it is advised to use a dedicated 263 | // memcache server. The memcache and memcached extensions do not provide isolated environments for individual uses. 264 | // Using the same server for other purposes (MUC for example) can lead to sessions being prematurely removed should 265 | // the other uses of the server purge the cache. 266 | // 267 | // Following setting allows you to alter how frequently is timemodified updated in sessions table. 268 | // $CFG->session_update_timemodified_frequency = 20; // In seconds. 269 | // 270 | // If this setting is set to true, then Moodle will track the IP of the 271 | // current user to make sure it hasn't changed during a session. This 272 | // will prevent the possibility of sessions being hijacked via XSS, but it 273 | // may break things for users coming using proxies that change all the time, 274 | // like AOL. 275 | // $CFG->tracksessionip = true; 276 | // 277 | // The following lines are for handling email bounces. 278 | // $CFG->handlebounces = true; 279 | // $CFG->minbounces = 10; 280 | // $CFG->bounceratio = .20; 281 | // The next lines are needed both for bounce handling and any other email to module processing. 282 | // mailprefix must be EXACTLY four characters. 283 | // Uncomment and customise this block for Postfix 284 | // $CFG->mailprefix = 'mdl+'; // + is the separator for Exim and Postfix. 285 | // $CFG->mailprefix = 'mdl-'; // - is the separator for qmail 286 | // $CFG->maildomain = 'youremaildomain.com'; 287 | // 288 | // Enable when setting up advanced reverse proxy load balancing configurations, 289 | // it may be also necessary to enable this when using port forwarding. 290 | // $CFG->reverseproxy = true; 291 | // 292 | // Enable when using external SSL appliance for performance reasons. 293 | // Please note that site may be accessible via https: or https:, but not both! 294 | if ( getenv('SSL_PROXY') == "true" ) { 295 | $CFG->sslproxy = true; 296 | } 297 | // 298 | // This setting will cause the userdate() function not to fix %d in 299 | // date strings, and just let them show with a zero prefix. 300 | // $CFG->nofixday = true; 301 | // 302 | // This setting will make some graphs (eg user logs) use lines instead of bars 303 | // $CFG->preferlinegraphs = true; 304 | // 305 | // Enabling this will allow custom scripts to replace existing moodle scripts. 306 | // For example: if $CFG->customscripts/course/view.php exists then 307 | // it will be used instead of $CFG->wwwroot/course/view.php 308 | // At present this will only work for files that include config.php and are called 309 | // as part of the url (index.php is implied). 310 | // Some examples are: 311 | // http://my.moodle.site/course/view.php 312 | // http://my.moodle.site/index.php 313 | // http://my.moodle.site/admin (index.php implied) 314 | // Custom scripts should not include config.php 315 | // Warning: Replacing standard moodle scripts may pose security risks and/or may not 316 | // be compatible with upgrades. Use this option only if you are aware of the risks 317 | // involved. 318 | // Specify the full directory path to the custom scripts 319 | // $CFG->customscripts = '/home/example/customscripts'; 320 | // 321 | // Performance profiling 322 | // 323 | // If you set Debug to "Yes" in the Configuration->Variables page some 324 | // performance profiling data will show up on your footer (in default theme). 325 | // With these settings you get more granular control over the capture 326 | // and printout of the data 327 | // 328 | // Capture performance profiling data 329 | // define('MDL_PERF' , true); 330 | // 331 | // Capture additional data from DB 332 | // define('MDL_PERFDB' , true); 333 | // 334 | // Print to log (for passive profiling of production servers) 335 | // define('MDL_PERFTOLOG' , true); 336 | // 337 | // Print to footer (works with the default theme) 338 | // define('MDL_PERFTOFOOT', true); 339 | // 340 | // Enable earlier profiling that causes more code to be covered 341 | // on every request (db connections, config load, other inits...). 342 | // Requires extra configuration to be defined in config.php like: 343 | // profilingincluded, profilingexcluded, profilingautofrec, 344 | // profilingallowme, profilingallowall, profilinglifetime 345 | // $CFG->earlyprofilingenabled = true; 346 | // 347 | // Force displayed usernames 348 | // A little hack to anonymise user names for all students. If you set these 349 | // then all non-teachers will always see these for every person. 350 | // $CFG->forcefirstname = 'Bruce'; 351 | // $CFG->forcelastname = 'Simpson'; 352 | // 353 | // The following setting will turn SQL Error logging on. This will output an 354 | // entry in apache error log indicating the position of the error and the statement 355 | // called. This option will action disregarding error_reporting setting. 356 | // $CFG->dblogerror = true; 357 | // 358 | // The following setting will log every database query to a table called adodb_logsql. 359 | // Use this setting on a development server only, the table grows quickly! 360 | // $CFG->logsql = true; 361 | // 362 | // The following setting will turn on username logging into Apache log. For full details regarding setting 363 | // up of this function please refer to the install section of the document. 364 | // $CFG->apacheloguser = 0; // Turn this feature off. Default value. 365 | // $CFG->apacheloguser = 1; // Log user id. 366 | // $CFG->apacheloguser = 2; // Log full name in cleaned format. ie, Darth Vader will be displayed as darth_vader. 367 | // $CFG->apacheloguser = 3; // Log username. 368 | // To get the values logged in Apache's log, add to your httpd.conf 369 | // the following statements. In the General part put: 370 | // LogFormat "%h %l %{MOODLEUSER}n %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" moodleformat 371 | // And in the part specific to your Moodle install / virtualhost: 372 | // CustomLog "/your/path/to/log" moodleformat 373 | // CAUTION: Use of this option will expose usernames in the Apache log, 374 | // If you are going to publish your log, or the output of your web stats analyzer 375 | // this will weaken the security of your website. 376 | // 377 | // Email database connection errors to someone. If Moodle cannot connect to the 378 | // database, then email this address with a notice. 379 | // 380 | // $CFG->emailconnectionerrorsto = 'your@emailaddress.com'; 381 | // 382 | // Set the priority of themes from highest to lowest. This is useful (for 383 | // example) in sites where the user theme should override all other theme 384 | // settings for accessibility reasons. You can also disable types of themes 385 | // (other than site) by removing them from the array. The default setting is: 386 | // $CFG->themeorder = array('course', 'category', 'session', 'user', 'site'); 387 | // NOTE: course, category, session, user themes still require the 388 | // respective settings to be enabled 389 | // 390 | // It is possible to add extra themes directory stored outside of $CFG->dirroot. 391 | // This local directory does not have to be accessible from internet. 392 | // 393 | // $CFG->themedir = '/location/of/extra/themes'; 394 | // 395 | // It is possible to specify different cache and temp directories, use local fast filesystem 396 | // for normal web servers. Server clusters MUST use shared filesystem for cachedir! 397 | // Localcachedir is intended for server clusters, it does not have to be shared by cluster nodes. 398 | // The directories must not be accessible via web. 399 | // 400 | // $CFG->tempdir = '/var/www/moodle/temp'; // Files used during one HTTP request only. 401 | // $CFG->cachedir = '/var/www/moodle/cache'; // Directory MUST BE SHARED by all cluster nodes, locking required. 402 | // $CFG->localcachedir = '/var/local/cache'; // Intended for local node caching. 403 | // 404 | // Some filesystems such as NFS may not support file locking operations. 405 | // Locking resolves race conditions and is strongly recommended for production servers. 406 | // $CFG->preventfilelocking = false; 407 | // 408 | // Site default language can be set via standard administration interface. If you 409 | // want to have initial error messages for eventual database connection problems 410 | // localized too, you have to set your language code here. 411 | // 412 | // $CFG->lang = 'yourlangcode'; // for example 'cs' 413 | // 414 | // When Moodle is about to perform an intensive operation it raises PHP's memory 415 | // limit. The following setting should be used on large sites to set the raised 416 | // memory limit to something higher. 417 | // The value for the settings should be a valid PHP memory value. e.g. 512M, 1G 418 | // 419 | // $CFG->extramemorylimit = '1024M'; 420 | // 421 | // Moodle 2.4 introduced a new cache API. 422 | // The cache API stores a configuration file within the Moodle data directory and 423 | // uses that rather than the database in order to function in a stand-alone manner. 424 | // Using altcacheconfigpath you can change the location where this config file is 425 | // looked for. 426 | // It can either be a directory in which to store the file, or the full path to the 427 | // file if you want to take full control. Either way it must be writable by the 428 | // webserver. 429 | // 430 | // $CFG->altcacheconfigpath = '/var/www/shared/moodle.cache.config.php 431 | // 432 | // The CSS files the Moodle produces can be extremely large and complex, especially 433 | // if you are using a custom theme that builds upon several other themes. 434 | // In Moodle 2.3 a CSS optimiser was added as an experimental feature for advanced 435 | // users. The CSS optimiser organises the CSS in order to reduce the overall number 436 | // of rules and styles being sent to the client. It does this by collating the 437 | // CSS before it is cached removing excess styles and rules and stripping out any 438 | // extraneous content such as comments and empty rules. 439 | // The following settings are used to enable and control the optimisation. 440 | // 441 | // Enable the CSS optimiser. This will only optimise the CSS if themedesignermode 442 | // is not enabled. This can be set through the UI however it is noted here as well 443 | // because the other CSS optimiser settings can not be set through the UI. 444 | // 445 | // $CFG->enablecssoptimiser = true; 446 | // 447 | // If set the CSS optimiser will add stats about the optimisation to the top of 448 | // the optimised CSS file. You can then inspect the CSS to see the affect the CSS 449 | // optimiser is having. 450 | // 451 | // $CFG->cssoptimiserstats = true; 452 | // 453 | // If set the CSS that is optimised will still retain a minimalistic formatting 454 | // so that anyone wanting to can still clearly read it. 455 | // 456 | // $CFG->cssoptimiserpretty = true; 457 | // 458 | // Use the following flag to completely disable the Available update notifications 459 | // feature and hide it from the server administration UI. 460 | // 461 | // $CFG->disableupdatenotifications = true; 462 | // 463 | // Use the following flag to completely disable the Automatic updates deployment 464 | // feature and hide it from the server administration UI. 465 | // 466 | // $CFG->disableupdateautodeploy = true; 467 | // 468 | // Use the following flag to completely disable the On-click add-on installation 469 | // feature and hide it from the server administration UI. 470 | // 471 | // $CFG->disableonclickaddoninstall = true; 472 | // 473 | // Use the following flag to disable modifications to scheduled tasks 474 | // whilst still showing the state of tasks. 475 | // 476 | // $CFG->preventscheduledtaskchanges = true; 477 | // 478 | // As of version 2.4 Moodle serves icons as SVG images if the users browser appears 479 | // to support SVG. 480 | // For those wanting to control the serving of SVG images the following setting can 481 | // be defined in your config.php. 482 | // If it is not defined then the default (browser detection) will occur. 483 | // 484 | // To ensure they are always used when available: 485 | // $CFG->svgicons = true; 486 | // 487 | // To ensure they are never used even when available: 488 | // $CFG->svgicons = false; 489 | // 490 | // Some administration options allow setting the path to executable files. This can 491 | // potentially cause a security risk. Set this option to true to disable editing 492 | // those config settings via the web. They will need to be set explicitly in the 493 | // config.php file 494 | // $CFG->preventexecpath = true; 495 | // 496 | // Use the following flag to set userid for noreply user. If not set then moodle will 497 | // create dummy user and use -ve value as user id. 498 | // $CFG->noreplyuserid = -10; 499 | // 500 | // As of version 2.6 Moodle supports admin to set support user. If not set, all mails 501 | // will be sent to supportemail. 502 | // $CFG->supportuserid = -20; 503 | // 504 | // Moodle 2.7 introduces a locking api for critical tasks (e.g. cron). 505 | // The default locking system to use is DB locking for MySQL and Postgres, and File 506 | // locking for Oracle and SQLServer. If $CFG->preventfilelocking is set, then the default 507 | // will always be DB locking. It can be manually set to one of the lock 508 | // factory classes listed below, or one of your own custom classes implementing the 509 | // \core\lock\lock_factory interface. 510 | // 511 | // $CFG->lock_factory = "auto"; 512 | // 513 | // The list of available lock factories is: 514 | // 515 | // "\\core\\lock\\file_lock_factory" - File locking 516 | // Uses lock files stored by default in the dataroot. Whether this 517 | // works on clusters depends on the file system used for the dataroot. 518 | // 519 | // "\\core\\lock\\db_row_lock_factory" - DB locking based on table rows. 520 | // 521 | // "\\core\\lock\\postgres_lock_factory" - DB locking based on postgres advisory locks. 522 | // 523 | // Settings used by the lock factories 524 | // 525 | // Location for lock files used by the File locking factory. This must exist 526 | // on a shared file system that supports locking. 527 | // $CFG->lock_file_root = $CFG->dataroot . '/lock'; 528 | // 529 | //========================================================================= 530 | // 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!! 531 | //========================================================================= 532 | // 533 | // Force a debugging mode regardless the settings in the site administration 534 | // @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS! 535 | // @ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS! 536 | // $CFG->debug = (E_ALL | E_STRICT); // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS! 537 | // $CFG->debugdisplay = 1; // NOT FOR PRODUCTION SERVERS! 538 | // 539 | // You can specify a comma separated list of user ids that that always see 540 | // debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay 541 | // for these users only. 542 | // $CFG->debugusers = '2'; 543 | // 544 | // Prevent theme caching 545 | // $CFG->themedesignermode = true; // NOT FOR PRODUCTION SERVERS! 546 | // 547 | // Prevent JS caching 548 | // $CFG->cachejs = false; // NOT FOR PRODUCTION SERVERS! 549 | // 550 | // Restrict which YUI logging statements are shown in the browser console. 551 | // For details see the upstream documentation: 552 | // http://yuilibrary.com/yui/docs/api/classes/config.html#property_logInclude 553 | // http://yuilibrary.com/yui/docs/api/classes/config.html#property_logExclude 554 | // $CFG->yuiloginclude = array( 555 | // 'moodle-core-dock-loader' => true, 556 | // 'moodle-course-categoryexpander' => true, 557 | // ); 558 | // $CFG->yuilogexclude = array( 559 | // 'moodle-core-dock' => true, 560 | // 'moodle-core-notification' => true, 561 | // ); 562 | // 563 | // Set the minimum log level for YUI logging statements. 564 | // For details see the upstream documentation: 565 | // http://yuilibrary.com/yui/docs/api/classes/config.html#property_logLevel 566 | // $CFG->yuiloglevel = 'debug'; 567 | // 568 | // Prevent core_string_manager application caching 569 | // $CFG->langstringcache = false; // NOT FOR PRODUCTION SERVERS! 570 | // 571 | // When working with production data on test servers, no emails or other messages 572 | // should ever be send to real users 573 | // $CFG->noemailever = true; // NOT FOR PRODUCTION SERVERS! 574 | // 575 | // Divert all outgoing emails to this address to test and debug emailing features 576 | // $CFG->divertallemailsto = 'root@localhost.local'; // NOT FOR PRODUCTION SERVERS! 577 | // 578 | // Uncomment if you want to allow empty comments when modifying install.xml files. 579 | // $CFG->xmldbdisablecommentchecking = true; // NOT FOR PRODUCTION SERVERS! 580 | // 581 | // Since 2.0 sql queries are not shown during upgrade by default. 582 | // Please note that this setting may produce very long upgrade page on large sites. 583 | // $CFG->upgradeshowsql = true; // NOT FOR PRODUCTION SERVERS! 584 | // 585 | // Add SQL queries to the output of cron, just before their execution 586 | // $CFG->showcronsql = true; 587 | // 588 | // Force developer level debug and add debug info to the output of cron 589 | // $CFG->showcrondebugging = true; 590 | // 591 | //========================================================================= 592 | // 8. FORCED SETTINGS 593 | //========================================================================= 594 | // It is possible to specify normal admin settings here, the point is that 595 | // they can not be changed through the standard admin settings pages any more. 596 | // 597 | // Core settings are specified directly via assignment to $CFG variable. 598 | // Example: 599 | // $CFG->somecoresetting = 'value'; 600 | // 601 | // Plugin settings have to be put into a special array. 602 | // Example: 603 | // $CFG->forced_plugin_settings = array('pluginname' => array('settingname' => 'value', 'secondsetting' => 'othervalue'), 604 | // 'otherplugin' => array('mysetting' => 'myvalue', 'thesetting' => 'thevalue')); 605 | // Module default settings with advanced/locked checkboxes can be set too. To do this, add 606 | // an extra config with '_adv' or '_locked' as a suffix and set the value to true or false. 607 | // Example: 608 | // $CFG->forced_plugin_settings = array('pluginname' => array('settingname' => 'value', 'settingname_locked' => true, 'settingname_adv' => true)); 609 | // 610 | //========================================================================= 611 | // 9. PHPUNIT SUPPORT 612 | //========================================================================= 613 | // $CFG->phpunit_prefix = 'phpu_'; 614 | // $CFG->phpunit_dataroot = '/home/example/phpu_moodledata'; 615 | // $CFG->phpunit_directorypermissions = 02777; // optional 616 | // 617 | // 618 | //========================================================================= 619 | // 10. SECRET PASSWORD SALT 620 | //========================================================================= 621 | // A site-wide password salt is no longer used in new installations. 622 | // If upgrading from 2.6 or older, keep all existing salts in config.php file. 623 | // 624 | // $CFG->passwordsaltmain = 'a_very_long_random_string_of_characters#@6&*1'; 625 | // 626 | // You may also have some alternative salts to allow migration from previously 627 | // used salts. 628 | // 629 | // $CFG->passwordsaltalt1 = ''; 630 | // $CFG->passwordsaltalt2 = ''; 631 | // $CFG->passwordsaltalt3 = ''; 632 | // .... 633 | // $CFG->passwordsaltalt19 = ''; 634 | // $CFG->passwordsaltalt20 = ''; 635 | // 636 | // 637 | //========================================================================= 638 | // 11. BEHAT SUPPORT 639 | //========================================================================= 640 | // Behat test site needs a unique www root, data directory and database prefix: 641 | // 642 | // $CFG->behat_wwwroot = 'http://127.0.0.1/moodle'; 643 | // $CFG->behat_prefix = 'bht_'; 644 | // $CFG->behat_dataroot = '/home/example/bht_moodledata'; 645 | // 646 | // You can override default Moodle configuration for Behat and add your own 647 | // params; here you can add more profiles, use different Mink drivers than Selenium... 648 | // These params would be merged with the default Moodle behat.yml, giving priority 649 | // to the ones specified here. The array format is YAML, following the Behat 650 | // params hierarchy. More info: http://docs.behat.org/guides/7.config.html 651 | // Example: 652 | // $CFG->behat_config = array( 653 | // 'default' => array( 654 | // 'formatter' => array( 655 | // 'name' => 'pretty', 656 | // 'parameters' => array( 657 | // 'decorated' => true, 658 | // 'verbose' => false 659 | // ) 660 | // ) 661 | // ), 662 | // 'Mac-Firefox' => array( 663 | // 'extensions' => array( 664 | // 'Behat\MinkExtension\Extension' => array( 665 | // 'selenium2' => array( 666 | // 'browser' => 'firefox', 667 | // 'capabilities' => array( 668 | // 'platform' => 'OS X 10.6', 669 | // 'version' => 20 670 | // ) 671 | // ) 672 | // ) 673 | // ) 674 | // ), 675 | // 'Mac-Safari' => array( 676 | // 'extensions' => array( 677 | // 'Behat\MinkExtension\Extension' => array( 678 | // 'selenium2' => array( 679 | // 'browser' => 'safari', 680 | // 'capabilities' => array( 681 | // 'platform' => 'OS X 10.8', 682 | // 'version' => 6 683 | // ) 684 | // ) 685 | // ) 686 | // ) 687 | // ) 688 | // ); 689 | // 690 | // You can force the browser session (not user's sessions) to restart after N seconds. This could 691 | // be useful if you are using a cloud-based service with time restrictions in the browser side. 692 | // Setting this value the browser session that Behat is using will be restarted. Set the time in 693 | // seconds. Is not recommended to use this setting if you don't explicitly need it. 694 | // Example: 695 | // $CFG->behat_restart_browser_after = 7200; // Restarts the browser session after 2 hours 696 | // 697 | // All this page's extra Moodle settings are compared against a white list of allowed settings 698 | // (the basic and behat_* ones) to avoid problems with production environments. This setting can be 699 | // used to expand the default white list with an array of extra settings. 700 | // Example: 701 | // $CFG->behat_extraallowedsettings = array('logsql', 'dblogerror'); 702 | // 703 | // You should explicitly allow the usage of the deprecated behat steps, otherwise an exception will 704 | // be thrown when using them. The setting is disabled by default. 705 | // Example: 706 | // $CFG->behat_usedeprecated = true; 707 | // 708 | // Including feature files from directories outside the dirroot is possible if required. The setting 709 | // requires that the running user has executable permissions on all parent directories in the paths. 710 | // Example: 711 | // $CFG->behat_additionalfeatures = array('/home/developer/code/wipfeatures'); 712 | // 713 | // You can make behat save several dumps when a scenario fails. The dumps currently saved are: 714 | // * a dump of the DOM in it's state at the time of failure; and 715 | // * a screenshot (JavaScript is required for the screenshot functionality, so not all browsers support this option) 716 | // Example: 717 | // $CFG->behat_faildump_path = '/my/path/to/save/failure/dumps'; 718 | // 719 | //========================================================================= 720 | // 12. DEVELOPER DATA GENERATOR 721 | //========================================================================= 722 | // 723 | // The developer data generator tool is intended to be used only in development or testing sites and 724 | // it's usage in production environments is not recommended; if it is used to create JMeter test plans 725 | // is even less recommended as JMeter needs to log in as site course users. JMeter needs to know the 726 | // users passwords but would be dangerous to have a default password as everybody would know it, which would 727 | // be specially dangerouse if somebody uses this tool in a production site, so in order to prevent unintended 728 | // uses of the tool and undesired accesses as well, is compulsory to set a password for the users 729 | // generated by this tool, but only in case you want to generate a JMeter test. The value should be a string. 730 | // Example: 731 | // $CFG->tool_generator_users_password = 'examplepassword'; 732 | // 733 | //========================================================================= 734 | // 13. SYSTEM PATHS (You need to set following, depending on your system) 735 | //========================================================================= 736 | // Ghostscript path. 737 | // On most Linux installs, this can be left as '/usr/bin/gs'. 738 | // On Windows it will be something like 'c:\gs\bin\gswin32c.exe' (make sure 739 | // there are no spaces in the path - if necessary copy the files 'gswin32c.exe' 740 | // and 'gsdll32.dll' to a new folder without a space in the path) 741 | // $CFG->pathtogs = '/usr/bin/gs'; 742 | // 743 | // Clam AV path. 744 | // Probably something like /usr/bin/clamscan or /usr/bin/clamdscan. You need 745 | // this in order for clam AV to run. 746 | // $CFG->pathtoclam = ''; 747 | // 748 | // Path to du. 749 | // Probably something like /usr/bin/du. If you enter this, pages that display 750 | // directory contents will run much faster for directories with a lot of files. 751 | // $CFG->pathtodu = ''; 752 | // 753 | // Path to aspell. 754 | // To use spell-checking within the editor, you MUST have aspell 0.50 or later 755 | // installed on your server, and you must specify the correct path to access the 756 | // aspell binary. On Unix/Linux systems, this path is usually /usr/bin/aspell, 757 | // but it might be something else. 758 | // $CFG->aspellpath = ''; 759 | // 760 | // Path to dot. 761 | // Probably something like /usr/bin/dot. To be able to generate graphics from 762 | // DOT files, you must have installed the dot executable and point to it here. 763 | // Note that, for now, this only used by the profiling features 764 | // (Development->Profiling) built into Moodle. 765 | // $CFG->pathtodot = ''; 766 | 767 | //========================================================================= 768 | // ALL DONE! To continue installation, visit your main page with a browser 769 | //========================================================================= 770 | 771 | require_once(dirname(__FILE__) . '/lib/setup.php'); // Do not edit 772 | 773 | // There is no php closing tag in this file, 774 | // it is intentional because it prevents trailing whitespace problems! 775 | -------------------------------------------------------------------------------- /moodle_variables.env: -------------------------------------------------------------------------------- 1 | # moodle envireonment variables file 2 | # v3 compose does not insert env variables for linked containers. In order not to break old deployments and new deployments, filling both fields 3 | # one used by MYSQL container and the other is used by moodle standing in for env variables that v1 would have populated. 4 | 5 | # database name 6 | 7 | MYSQL_DATABASE=moodle 8 | DB_ENV_MYSQL_DATABASE=moodle 9 | 10 | # mysql root user password 11 | 12 | MYSQL_ROOT_PASSWORD=moodle 13 | 14 | # mysql moodle user 15 | 16 | MYSQL_USER=moodle 17 | DB_ENV_MYSQL_USER=moodle 18 | 19 | # mysql moodle user password 20 | 21 | MYSQL_PASSWORD=moodle 22 | DB_ENV_MYSQL_PASSWORD=moodle 23 | 24 | # db port for Mysql 25 | 26 | DB_PORT_3306_TCP_ADDR=DB 27 | 28 | # moodle url, if running locally, localhost is fine. 29 | # you should use an FQDN here and setup that record for resolution inside DNS to your resulting containers. 30 | # or use service discovery. This is used in moodle's internal redirects. If for testing only, use of http://localhost 31 | # will be fine. But for production deployments you should leverage an FQDN. 32 | 33 | MOODLE_URL=http://localhost 34 | #MOODLE_URL=http://moodle.company.com 35 | 36 | # Enable when using external SSL reverse proxy 37 | SSL_PROXY=false 38 | -------------------------------------------------------------------------------- /moodlecron: -------------------------------------------------------------------------------- 1 | */10 * * * * /usr/bin/php /var/www/html/admin/cli/cron.php >/dev/null 2 | --------------------------------------------------------------------------------