-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.docker-template.php
executable file
·88 lines (73 loc) · 3.01 KB
/
config.docker-template.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('MOODLE_DOCKER_DBTYPE');
$CFG->dblibrary = 'native';
$CFG->dbhost = 'db';
$CFG->dbname = getenv('MOODLE_DOCKER_DBNAME');
$CFG->dbuser = getenv('MOODLE_DOCKER_DBUSER');
$CFG->dbpass = getenv('MOODLE_DOCKER_DBPASS');
$CFG->prefix = 'mdl_';
$CFG->dboptions = ['dbcollation' => getenv('MOODLE_DOCKER_DBCOLLATION')];
$CFG->theme = 'monasheass';
$host = 'localhost';
if (!empty(getenv('MOODLE_DOCKER_WEB_HOST'))) {
$host = getenv('MOODLE_DOCKER_WEB_HOST');
}
$CFG->wwwroot = "http://{$host}";
$port = getenv('MOODLE_DOCKER_WEB_PORT');
if (!empty($port) && 80 != $port) {
$CFG->wwwroot .= ":{$port}";
}
$CFG->dataroot = '/var/www/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
$CFG->smtphosts = 'mailhog:1025';
// Debug options - possible to be controlled by flag in future..
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
// Prevent JS caching
$CFG->cachejs = false;
$CFG->phpunit_dataroot = '/var/www/phpunitdata';
$CFG->phpunit_prefix = 'phpu_';
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://exttests');
$CFG->behat_wwwroot = 'http://webserver';
$CFG->behat_dataroot = '/var/www/behatdata';
$CFG->behat_prefix = 'bht_';
$CFG->behat_profiles = array(
'default' => array(
'browser' => getenv('MOODLE_DOCKER_BROWSER'),
'wd_host' => 'http://selenium:4444/wd/hub',
),
);
$CFG->behat_faildump_path = '/var/www/behatfaildumps';
define('PHPUNIT_LONGTEST', true);
if (getenv('MOODLE_DOCKER_PHPUNIT_EXTRAS')) {
define('TEST_SEARCH_SOLR_HOSTNAME', 'solr');
define('TEST_SEARCH_SOLR_INDEXNAME', 'test');
define('TEST_SEARCH_SOLR_PORT', 8983);
define('TEST_SESSION_REDIS_HOST', 'redis');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'redis');
define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://mongo:27017');
define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', "memcached0:11211\nmemcached1:11211");
define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', "memcached0:11211\nmemcached1:11211");
define('TEST_LDAPLIB_HOST_URL', 'ldap://ldap');
define('TEST_LDAPLIB_BIND_DN', 'cn=admin,dc=openstack,dc=org');
define('TEST_LDAPLIB_BIND_PW', 'password');
define('TEST_LDAPLIB_DOMAIN', 'ou=Users,dc=openstack,dc=org');
define('TEST_AUTH_LDAP_HOST_URL', 'ldap://ldap');
define('TEST_AUTH_LDAP_BIND_DN', 'cn=admin,dc=openstack,dc=org');
define('TEST_AUTH_LDAP_BIND_PW', 'password');
define('TEST_AUTH_LDAP_DOMAIN', 'ou=Users,dc=openstack,dc=org');
define('TEST_ENROL_LDAP_HOST_URL', 'ldap://ldap');
define('TEST_ENROL_LDAP_BIND_DN', 'cn=admin,dc=openstack,dc=org');
define('TEST_ENROL_LDAP_BIND_PW', 'password');
define('TEST_ENROL_LDAP_DOMAIN', 'ou=Users,dc=openstack,dc=org');
}
require_once(__DIR__ . '/lib/setup.php');