server/.config/env.php
Ryan McCue 3e7bc6e67b Initial export of the repository
Signed-off-by: Ryan McCue <me@ryanmccue.info>
2025-06-05 11:48:47 +02:00

27 lines
864 B
PHP

<?php
/**
* Connect environment variables to WP constants.
*/
defined( 'DB_HOST' ) or define( 'DB_HOST', getenv( 'DB_HOST' ) );
defined( 'DB_USER' ) or define( 'DB_USER', getenv( 'DB_USER' ) );
defined( 'DB_PASSWORD' ) or define( 'DB_PASSWORD', getenv( 'DB_PASSWORD' ) );
defined( 'DB_NAME' ) or define( 'DB_NAME', getenv( 'DB_NAME' ) );
define( 'ELASTICSEARCH_HOST', getenv( 'ELASTICSEARCH_HOST' ) );
define( 'ELASTICSEARCH_PORT', getenv( 'ELASTICSEARCH_PORT' ) );
if ( ! defined( 'AWS_XRAY_DAEMON_IP_ADDRESS' ) ) {
define( 'AWS_XRAY_DAEMON_IP_ADDRESS', gethostbyname( getenv( 'AWS_XRAY_DAEMON_HOST' ) ) );
}
define( 'REDIS_HOST', getenv( 'REDIS_HOST' ) );
define( 'REDIS_PORT', getenv( 'REDIS_PORT' ) );
define( 'REDIS_SECURE', false );
define( 'REDIS_AUTH', '' );
global $redis_server;
$redis_server = [
'host' => REDIS_HOST,
'port' => REDIS_PORT,
];