-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate config to application (dvsa/olcs-backend#78)
* feat: migrate config to application * !fixup * !fixup * !fixup * Revert "!fixup" This reverts commit 15088c6bd5269de8a8081ba3bd76a99b51b1ad3a. * fix: use `getenv` instead of `$_ENV` * fix: fix production environment identifiers * fix: fix local config undefined index * fix: add timeout to AWS calls in config * chore: apply PHPCS
- Loading branch information
1 parent
d6f2acc
commit 99a2ee8
Showing
6 changed files
with
921 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Dvsa\LaminasConfigCloudParameters\ParameterProvider\Aws\SecretsManager; | ||
use Dvsa\LaminasConfigCloudParameters\ParameterProvider\Aws\ParameterStore; | ||
|
||
$environment = getenv('ENVIRONMENT_NAME'); | ||
|
||
$providers = []; | ||
|
||
if (!empty($environment)) { | ||
$providers = [ | ||
SecretsManager::class => [ | ||
sprintf('DEVAPP%s-BASE-SM-APPLICATION-API', strtoupper($environment)), | ||
], | ||
ParameterStore::class => [ | ||
sprintf('/applicationparams/%s/', strtolower($environment)), | ||
], | ||
]; | ||
} | ||
|
||
return [ | ||
'aws' => [ | ||
'global' => [ | ||
'http' => [ | ||
'connect_timeout' => 5, | ||
'timeout' => 5, | ||
], | ||
], | ||
], | ||
'config_parameters' => [ | ||
'providers' => $providers, | ||
], | ||
]; |
Oops, something went wrong.