Skip to content

Commit

Permalink
Merge branch 'master' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed May 7, 2024
2 parents 2be0bbf + 6632d40 commit d079524
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
8.3#2024-04-16T14:30:30.097Z
8.2#2024-04-16T14:30:30.097Z
8.1#2024-04-16T14:30:30.097Z
8.3#2024-04-25T05:35:46.308527Z
8.2#2024-04-25T05:35:46.308527Z
8.1#2024-04-25T05:35:46.308527Z
22 changes: 22 additions & 0 deletions templates/drupal10.settings.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ $wodby['redis']['port'] = '{{ getenv "REDIS_PORT" "6379" }}';
$wodby['redis']['password'] = '{{ getenv "REDIS_PASSWORD" }}';
{{- end }}

$wodby['valkey']['host'] = '{{ getenv "VALKEY_HOST" "" }}';
$wodby['valkey']['port'] = '{{ getenv "VALKEY_PORT" "6379" }}';
{{- if getenv "VALKEY_PASSWORD" }}
$wodby['valkey']['password'] = '{{ getenv "VALKEY_PASSWORD" }}';
{{- end }}

$wodby['solr_cloud']['password'] = '{{ getenv "SOLR_CLOUD_PASSWORD" }}';
$wodby['solr_cloud']['server'] = '{{ getenv "SOLR_CLOUD_SERVER" "solr" }}';

Expand Down Expand Up @@ -165,6 +171,22 @@ if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'install') {

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}

if (!empty($wodby['valkey']['host']) && $redis_module_path) {
$settings['redis.connection']['host'] = $wodby['valkey']['host'];
$settings['redis.connection']['port'] = $wodby['valkey']['port'];
if(isset($wodby['valkey']['password'])) {
$settings['redis.connection']['password'] = $wodby['valkey']['password'];
}
$settings['redis.connection']['base'] = 0;
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['cache']['default'] = 'cache.backend.redis';
$settings['cache']['bins']['bootstrap'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['discovery'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['config'] = 'cache.backend.chainedfast';

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}
}

if (!empty($wodby['solr_cloud']['password'])) {
Expand Down
21 changes: 21 additions & 0 deletions templates/drupal7.settings.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ $wodby['redis']['port'] = '{{ getenv "REDIS_PORT" "6379" }}';
$wodby['redis']['password'] = '{{ getenv "REDIS_PASSWORD" }}';
{{- end }}

$wodby['valkey']['host'] = '{{ getenv "VALKEY_HOST" "" }}';
$wodby['valkey']['port'] = '{{ getenv "VALKEY_PORT" "6379" }}';
{{- if getenv "VALKEY_PASSWORD" }}
$wodby['valkey']['password'] = '{{ getenv "VALKEY_PASSWORD" }}';
{{- end }}

$conf['reverse_proxy_addresses'] = (function () {
$internalSubnet = '172.17.0.0';
$internalBits = 16;
Expand Down Expand Up @@ -163,6 +169,21 @@ if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'install') {
$conf['lock_inc'] = "$redis_module_path/redis.lock.inc";
$conf['path_inc'] = "$redis_module_path/redis.path.inc";
}

if (!empty($wodby['valkey']['host']) && $redis_module_path) {
$conf['redis_client_host'] = $wodby['valkey']['host'];
$conf['redis_client_port'] = $wodby['valkey']['port'];
if(isset($wodby['valkey']['password'])) {
$conf['redis_client_password'] = $wodby['valkey']['password'];
}
$conf['redis_client_base'] = 0;
$conf['redis_client_interface'] = 'PhpRedis';
$conf['cache_backends'][] = "$redis_module_path/redis.autoload.inc";
$conf['cache_default_class'] = 'Redis_Cache';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['lock_inc'] = "$redis_module_path/redis.lock.inc";
$conf['path_inc'] = "$redis_module_path/redis.path.inc";
}
}

ini_set('session.gc_probability', 1);
Expand Down
22 changes: 22 additions & 0 deletions templates/drupal8.settings.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ $wodby['redis']['port'] = '{{ getenv "REDIS_PORT" "6379" }}';
$wodby['redis']['password'] = '{{ getenv "REDIS_PASSWORD" }}';
{{- end }}

$wodby['valkey']['host'] = '{{ getenv "VALKEY_HOST" "" }}';
$wodby['valkey']['port'] = '{{ getenv "VALKEY_PORT" "6379" }}';
{{- if getenv "VALKEY_PASSWORD" }}
$wodby['valkey']['password'] = '{{ getenv "VALKEY_PASSWORD" }}';
{{- end }}

$wodby['solr_cloud']['password'] = '{{ getenv "SOLR_CLOUD_PASSWORD" }}';
$wodby['solr_cloud']['server'] = '{{ getenv "SOLR_CLOUD_SERVER" "solr" }}';

Expand Down Expand Up @@ -171,6 +177,22 @@ if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'install') {

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}

if (!empty($wodby['valkey']['host']) && $redis_module_path) {
$settings['redis.connection']['host'] = $wodby['valkey']['host'];
$settings['redis.connection']['port'] = $wodby['valkey']['port'];
if(isset($wodby['valkey']['password'])) {
$settings['redis.connection']['password'] = $wodby['valkey']['password'];
}
$settings['redis.connection']['base'] = 0;
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['cache']['default'] = 'cache.backend.redis';
$settings['cache']['bins']['bootstrap'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['discovery'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['config'] = 'cache.backend.chainedfast';

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}
}

if (!empty($wodby['solr_cloud']['password'])) {
Expand Down
22 changes: 22 additions & 0 deletions templates/drupal9.settings.php.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ $wodby['redis']['port'] = '{{ getenv "REDIS_PORT" "6379" }}';
$wodby['redis']['password'] = '{{ getenv "REDIS_PASSWORD" }}';
{{- end }}

$wodby['valkey']['host'] = '{{ getenv "VALKEY_HOST" "" }}';
$wodby['valkey']['port'] = '{{ getenv "VALKEY_PORT" "6379" }}';
{{- if getenv "VALKEY_PASSWORD" }}
$wodby['valkey']['password'] = '{{ getenv "VALKEY_PASSWORD" }}';
{{- end }}

$wodby['solr_cloud']['password'] = '{{ getenv "SOLR_CLOUD_PASSWORD" }}';
$wodby['solr_cloud']['server'] = '{{ getenv "SOLR_CLOUD_SERVER" "solr" }}';

Expand Down Expand Up @@ -165,6 +171,22 @@ if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'install') {

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}

if (!empty($wodby['valkey']['host']) && $redis_module_path) {
$settings['redis.connection']['host'] = $wodby['valkey']['host'];
$settings['redis.connection']['port'] = $wodby['valkey']['port'];
if(isset($wodby['valkey']['password'])) {
$settings['redis.connection']['password'] = $wodby['valkey']['password'];
}
$settings['redis.connection']['base'] = 0;
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['cache']['default'] = 'cache.backend.redis';
$settings['cache']['bins']['bootstrap'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['discovery'] = 'cache.backend.chainedfast';
$settings['cache']['bins']['config'] = 'cache.backend.chainedfast';

$settings['container_yamls'][] = "$redis_module_path/example.services.yml";
}
}

if (!empty($wodby['solr_cloud']['password'])) {
Expand Down
12 changes: 6 additions & 6 deletions tests/10/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ services:
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal

redis:
image: wodby/redis
valkey:
image: wodby/valkey
environment:
REDIS_PASSWORD: redis
VALKEY_PASSWORD: valkey

php:
image: $IMAGE
Expand All @@ -45,9 +45,9 @@ services:
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
VALKEY_HOST: valkey
VALKEY_PORT: 6379
VALKEY_PASSWORD: valkey
PHP_SENDMAIL_PATH: /bin/true
PHP_ERROR_REPORTING: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
volumes:
Expand Down
6 changes: 3 additions & 3 deletions tests/10/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ run_action init-drupal

drush si -y --db-url="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}"

# Comment out redis settings before enabling the module.
sed -i "s#^\$wodby\['redis'\]#//&#" "${CONF_DIR}/wodby.settings.php"
# Comment out valkey settings before enabling the module.
sed -i "s#^\$wodby\['valkey'\]#//&#" "${CONF_DIR}/wodby.settings.php"
drush en redis -y --quiet
sed -i "s#^//\(\$wodby\['redis'\]\)#\1#" "${CONF_DIR}/wodby.settings.php"
sed -i "s#^//\(\$wodby\['valkey'\]\)#\1#" "${CONF_DIR}/wodby.settings.php"

run_action cache-clear target=render
run_action cache-rebuild
Expand Down
12 changes: 6 additions & 6 deletions tests/7/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ services:
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal

redis:
image: wodby/redis
valkey:
image: wodby/valkey
environment:
REDIS_PASSWORD: redis
VALKEY_PASSWORD: valkey

varnish:
image: wodby/varnish:4
Expand Down Expand Up @@ -63,9 +63,9 @@ services:
VARNISH_TERMINAL_PORT: 6082
VARNISH_SECRET: secret
VARNISH_VERSION: 4
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: redis
VALKEY_HOST: valkey
VALKEY_PORT: 6379
VALKEY_PASSWORD: valkey
PHP_SENDMAIL_PATH: /bin/true
volumes:
- codebase:/var/www/html
Expand Down

0 comments on commit d079524

Please sign in to comment.