Updated config parsers for docker image to accept new mercure env vars and configs

This commit is contained in:
Alejandro Celaya
2020-04-12 20:41:23 +02:00
parent 8d888cb43d
commit 934fa937b5
4 changed files with 35 additions and 10 deletions

View File

@@ -79,6 +79,17 @@ $helper = new class {
$value = (int) env('DEFAULT_SHORT_CODES_LENGTH', DEFAULT_SHORT_CODES_LENGTH);
return $value < MIN_SHORT_CODES_LENGTH ? MIN_SHORT_CODES_LENGTH : $value;
}
public function getMercureConfig(): array
{
$publicUrl = env('MERCURE_PUBLIC_HUB_URL');
return [
'public_hub_url' => $publicUrl,
'internal_hub_url' => env('MERCURE_INTERNAL_HUB_URL', $publicUrl),
'jwt_secret' => env('MERCURE_JWT_SECRET'),
];
}
};
return [
@@ -147,4 +158,6 @@ return [
],
],
'mercure' => $helper->getMercureConfig(),
];