forked from wunderio/drupal-ping
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.php
More file actions
58 lines (49 loc) · 1.56 KB
/
settings.php
File metadata and controls
58 lines (49 loc) · 1.56 KB
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
<?php
/**
* @file
* This is a settings.php for testing _ping.php functionality.
*/
if (empty($settings)) {
$settings = [];
}
if (empty($databases)) {
$databases = [];
}
// DB.
$db = json_decode(getenv('LANDO_INFO'))->mariadb;
$databases['default']['default'] = [
'database' => $db->creds->database,
'username' => $db->creds->user,
'password' => $db->creds->password,
'host' => $db->internal_connection->host,
'port' => $db->internal_connection->port,
'driver' => 'mysql',
'prefix' => '',
'collation' => 'utf8mb4_general_ci',
];
// REDIS.
$redis = json_decode(getenv('LANDO_INFO'))->redis;
$settings['redis.connection']['host'] = $redis->internal_connection->host;
$settings['redis.connection']['port'] = $redis->internal_connection->port;
// MEMCACHED.
$memcached = json_decode(getenv('LANDO_INFO'))->memcached;
$hostport = sprintf('%s:%s', $memcached->internal_connection->host, $memcached->internal_connection->port);
$settings['memcache']['servers'] = [
$hostport => 'default',
];
// ELASTICSEARCH.
$settings['ping_elasticsearch_connections'] = [
[
// Host and port are not exposed by the custom image, therefore hardcode.
'host' => 'elasticsearch',
'port' => 9200,
// Proto: http or https.
'proto' => 'http',
// Severity: warning or error.
'severity' => 'warning',
],
];
// For debugging add "?debug=test" to the query - 4 letters of the hash.
$settings['hash_salt'] = 'testing';
// @codingStandardsIgnoreLine DrupalPractice.Commenting.CommentEmptyLine.SpacingAfter
// Ignore settings added by Drupal install below this line.