Skip to content

Commit 461cfa2

Browse files
authored
Merge pull request #17 from ensi-platform/task-105512-v7
#105512 Дополнение конфигурации. Рефакторинг
2 parents 4ac2aea + fd018a3 commit 461cfa2

File tree

11 files changed

+54
-983
lines changed

11 files changed

+54
-983
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [v7, v8]
66
pull_request:
7-
branches: [master]
7+
branches: [v7, v8]
88

99
jobs:
1010
test:

.huskyrc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,18 @@ $records = ElasticQuery::getQueryLog();
266266
ElasticQuery::disableQueryLog();
267267
```
268268

269+
## Environment Variables
270+
Below see the environment variables that you can configure with the default values,
271+
Hosts should be comma seperated string of hosts with protocol prefix and port suffix, e.g. `http://localhost:9200,http://localhost:9201`
272+
273+
```dotenv
274+
ELASTICSEARCH_HOSTS=https://localhost:9200'
275+
ELASTICSEARCH_RETRIES=2
276+
ELASTICSEARCH_USERNAME=admin
277+
ELASTICSEARCH_PASSWORD=admin
278+
ELASTICSEARCH_SSL_VERIFICATION=true,
279+
```
280+
269281
## Contributing
270282

271283
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"cs": "php-cs-fixer fix --config .php-cs-fixer.php",
4141
"test": "vendor/bin/phpunit",
4242
"test-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html coverage"
43-
4443
},
4544
"config": {
4645
"sort-packages": true

config/config.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
* Elasticsearch hosts in format http[s]://[user][:pass]@hostname[:9200]
77
*/
88
'hosts' => explode(',', env('ELASTICSEARCH_HOSTS')),
9-
]
9+
10+
'retries' => env('ELASTICSEARCH_RETRIES', 1),
11+
'username' => env('ELASTICSEARCH_USERNAME', ''),
12+
'password' => env('ELASTICSEARCH_PASSWORD', ''),
13+
'ssl_verification' => env('ELASTICSEARCH_SSL_VERIFICATION', false),
14+
],
1015
];

0 commit comments

Comments
 (0)