Fix database connection to use TCP port instead of Unix socket
All checks were successful
Deploy Production Email Reports (Unified) / deploy (push) Successful in 57s
All checks were successful
Deploy Production Email Reports (Unified) / deploy (push) Successful in 57s
This commit is contained in:
@@ -14,6 +14,7 @@ $config = [
|
|||||||
'crew' => [
|
'crew' => [
|
||||||
'db_name' => getenv('DB_NAME_CREW') ?: 'custom_design',
|
'db_name' => getenv('DB_NAME_CREW') ?: 'custom_design',
|
||||||
'db_host' => getenv('DB_HOST_CREW') ?: getenv('DB_HOST') ?: 'mysql',
|
'db_host' => getenv('DB_HOST_CREW') ?: getenv('DB_HOST') ?: 'mysql',
|
||||||
|
'db_port' => getenv('DB_PORT_CREW') ?: '3306',
|
||||||
'db_user' => getenv('DB_USER_CREW') ?: 'crew_user',
|
'db_user' => getenv('DB_USER_CREW') ?: 'crew_user',
|
||||||
'db_pass' => getenv('DB_PASS_CREW') ?: getenv('DB_PASS'),
|
'db_pass' => getenv('DB_PASS_CREW') ?: getenv('DB_PASS'),
|
||||||
'smtp_user' => 'mail@crewsportswear.com',
|
'smtp_user' => 'mail@crewsportswear.com',
|
||||||
@@ -30,6 +31,7 @@ $config = [
|
|||||||
'merchbay' => [
|
'merchbay' => [
|
||||||
'db_name' => getenv('DB_NAME_MERCHBAY') ?: 'merchbay_laravel',
|
'db_name' => getenv('DB_NAME_MERCHBAY') ?: 'merchbay_laravel',
|
||||||
'db_host' => getenv('DB_HOST_MERCHBAY') ?: getenv('DB_HOST') ?: 'mysql',
|
'db_host' => getenv('DB_HOST_MERCHBAY') ?: getenv('DB_HOST') ?: 'mysql',
|
||||||
|
'db_port' => getenv('DB_PORT_MERCHBAY') ?: '3306',
|
||||||
'db_user' => getenv('DB_USER_MERCHBAY') ?: 'merchbay_user',
|
'db_user' => getenv('DB_USER_MERCHBAY') ?: 'merchbay_user',
|
||||||
'db_pass' => getenv('DB_PASS_MERCHBAY') ?: getenv('DB_PASS'),
|
'db_pass' => getenv('DB_PASS_MERCHBAY') ?: getenv('DB_PASS'),
|
||||||
'smtp_user' => 'support@merchbay.com',
|
'smtp_user' => 'support@merchbay.com',
|
||||||
@@ -50,7 +52,7 @@ $cfg = $config[$brand];
|
|||||||
// Connect to brand-specific database
|
// Connect to brand-specific database
|
||||||
try {
|
try {
|
||||||
$conn = new PDO(
|
$conn = new PDO(
|
||||||
"mysql:host={$cfg['db_host']};dbname={$cfg['db_name']}",
|
"mysql:host={$cfg['db_host']};port={$cfg['db_port']};dbname={$cfg['db_name']}",
|
||||||
$cfg['db_user'],
|
$cfg['db_user'],
|
||||||
$cfg['db_pass']
|
$cfg['db_pass']
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user