Skip to content

Commit

Permalink
Update to support MARIADB_READREPLICA_HOSTS
Browse files Browse the repository at this point in the history
  • Loading branch information
steveworley authored and nicksantamaria committed Nov 10, 2022
1 parent 5ba8c2b commit e8d5835
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions images/bay-php/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@

$databases['default']['default'] = $connection_info;

// If Lagoon defines the DB_READREPLICA_HOSTS we add this to the available
// If Lagoon defines the MARIADB_READREPLICA_HOSTS we add this to the available
// database connections. This allows core services to offload some
// queries to the replica.
//
// @see core/services.yml database.replica
if (getenv('DB_READREPLICA_HOSTS')) {
$replica_hosts = explode(' ', getenv('DB_READREPLICA_HOSTS'));
if (getenv('MARIADB_READREPLICA_HOSTS')) {
$replica_hosts = explode(' ', getenv('MARIADB_READREPLICA_HOSTS'));
$replica_hosts = array_map('trim', $replica_hosts);

// This allows --database=reader so Drush can be set to target the
Expand Down

0 comments on commit e8d5835

Please sign in to comment.