Commit ff996c1b23ae115a88bd01a49c80aec73483508d
1 parent
ddca25e1bb
Exists in
master
and in
2 other branches
Changed env calls to config
Showing 4 changed files with 39 additions and 7 deletions
api/.env.example
View file @
ff996c1
api/app/Http/Controllers/ConfigController.php
View file @
ff996c1
... | ... | @@ -9,19 +9,25 @@ |
9 | 9 | public function index(Request $request) |
10 | 10 | { |
11 | 11 | return [ |
12 | - 'base_url' => env('APP_URL'), | |
13 | - 'od_url' => env('GRAFANA_URL'), | |
14 | - 'mltd_url' => env('GRAFANA_URL'), | |
15 | - 'ceptd_url' => env('KIBANA_URL') | |
12 | + 'base_url' => config('app.url'), | |
13 | + 'od_url' => config('kea.grafana.url') . | |
14 | + (config('kea.grafana.port') ? ':' . config('kea.grafana.port') : '') | |
15 | + . config('kea.grafana.od_params'), | |
16 | + 'mltd_url' => config('kea.grafana.url') . | |
17 | + (config('kea.grafana.port') ? ':' . config('kea.grafana.port') : '') | |
18 | + . config('kea.grafana.mltd_params'), | |
19 | + 'ceptd_url' => config('kea.kibana.url') . | |
20 | + (config('kea.kibana.port') ? ':' . config('kea.kibana.port') : '') | |
21 | + . config('kea.kibana.ceptd_params'), | |
16 | 22 | ]; |
17 | 23 | } |
18 | 24 | |
19 | 25 | public function keycloak(Request $request) |
20 | 26 | { |
21 | 27 | return [ |
22 | - 'realm' => env('KEYCLOAK_REALM'), | |
23 | - 'url' => env('KEYCLOAK_URL'), | |
24 | - 'clientId' => env('KEYCLOAK_CLIENT_ID'), | |
28 | + 'realm' => config('keycloak.realm'), | |
29 | + 'url' => config('keycloak.url'), | |
30 | + 'clientId' => config('keycloak.client_id'), | |
25 | 31 | ]; |
26 | 32 | } |
27 | 33 | } |
api/config/kea.php
View file @
ff996c1
1 | +<?php | |
2 | + | |
3 | +return [ | |
4 | + | |
5 | + 'auth_enabled' => env('AUTH_ENABLED', false), | |
6 | + | |
7 | + 'kibana' => [ | |
8 | + 'url' => env('KIBANA_URL', null), | |
9 | + 'port' => env('KIBANA_PORT', null), | |
10 | + 'ceptd_params' => env('CEPTD_KIBANA_PARAMS', null), | |
11 | + ], | |
12 | + | |
13 | + 'grafana' => [ | |
14 | + 'url' => env('GRAFANA_URL', null), | |
15 | + 'port' => env('GRAFANA_PORT', null), | |
16 | + 'od_params' => env('OD_GRAFANA_PARAMS', null), | |
17 | + 'mltd_params' => env('MLTD_GRAFANA_PARAMS', null), | |
18 | + ], | |
19 | + | |
20 | + 'remote_syslog' => env('REMOTESYSLOG', null), | |
21 | +]; |
api/config/keycloak.php
View file @
ff996c1
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | + 'realm' => env('KEYCLOAK_REALM', null), | |
5 | + 'url' => env('KEYCLOAK_URL', null), | |
6 | + 'client_id' => env('KEYCLOAK_CLIENT_ID', null), | |
4 | 7 | 'realm_public_key' => env('KEYCLOAK_REALM_PUBLIC_KEY', null), |
5 | 8 | 'load_user_from_database' => env('KEYCLOAK_LOAD_USER_FROM_DATABASE', false), |
6 | 9 | 'user_provider_credential' => env('KEYCLOAK_USER_PROVIDER_CREDENTIAL', 'username'), |