From 8d3035dd0ca07a9bc8f708b89268048ebd22ac39 Mon Sep 17 00:00:00 2001 From: Juan24 <93536474+juanbroder24@users.noreply.github.com> Date: Tue, 3 Jun 2025 15:13:29 -0300 Subject: [PATCH 1/2] Fix_new_env_variable --- config/app.php | 2 ++ config/l5-swagger.php | 2 +- helm-chart-backoffice/values-production.yaml | 1 + helm-chart-backoffice/values-staging.yaml | 1 + resources/views/scripts.blade.php | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index 1c3bd7a..2d1b138 100644 --- a/config/app.php +++ b/config/app.php @@ -19,6 +19,8 @@ 'url' => env('APP_URL', 'http://localhost'), + 'api_url' => env('API_URL', 'http://localhost'), + 'timezone' => 'UTC', diff --git a/config/l5-swagger.php b/config/l5-swagger.php index 4a57c93..dafd92a 100644 --- a/config/l5-swagger.php +++ b/config/l5-swagger.php @@ -234,6 +234,6 @@ |-------------------------------------------------------------------------- */ 'constants' => [ - 'L5_SWAGGER_CONST_HOST' => config('app.url') . '/api', + 'L5_SWAGGER_CONST_HOST' => env('APP_URL', null), ], ]; diff --git a/helm-chart-backoffice/values-production.yaml b/helm-chart-backoffice/values-production.yaml index f5d3cc9..c171466 100644 --- a/helm-chart-backoffice/values-production.yaml +++ b/helm-chart-backoffice/values-production.yaml @@ -18,6 +18,7 @@ env: APP_DEBUG: false APP_LOG_LEVEL: info APP_URL: https://preparemessages.ifrc.org + API_URL: https://api-preparemessages.ifrc.org/api GOOGLE_MAPS_KEY: DB_CONNECTION: mysql DB_PORT: 3306 diff --git a/helm-chart-backoffice/values-staging.yaml b/helm-chart-backoffice/values-staging.yaml index c03a182..c59ca8a 100644 --- a/helm-chart-backoffice/values-staging.yaml +++ b/helm-chart-backoffice/values-staging.yaml @@ -18,6 +18,7 @@ env: APP_DEBUG: true APP_LOG_LEVEL: debug APP_URL: https://preparemessages-stage.ifrc.org + API_URL: https://api-preparemessages-stage.ifrc.org/api GOOGLE_MAPS_KEY: DB_CONNECTION: mysql DB_PORT: 3306 diff --git a/resources/views/scripts.blade.php b/resources/views/scripts.blade.php index 9b0482d..3ca1e35 100644 --- a/resources/views/scripts.blade.php +++ b/resources/views/scripts.blade.php @@ -3,7 +3,7 @@ $config = [ 'appName' => config('app.name'), 'url' => config('app.url'), - 'api_url'=> config('rcnapi.url'), + 'api_url'=> config('app.api_url'), 'appEnv' => config('app.env'), 'locale' => $locale = app()->getLocale(), 'locales' => config('app.locales'), From 4ca79d6be4f635a383deadad02fbdb1de4eda1b9 Mon Sep 17 00:00:00 2001 From: Juan24 <93536474+juanbroder24@users.noreply.github.com> Date: Tue, 3 Jun 2025 15:18:33 -0300 Subject: [PATCH 2/2] fix --- helm-chart-backoffice/values-production.yaml | 2 +- helm-chart-backoffice/values-staging.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-chart-backoffice/values-production.yaml b/helm-chart-backoffice/values-production.yaml index c171466..dff5e05 100644 --- a/helm-chart-backoffice/values-production.yaml +++ b/helm-chart-backoffice/values-production.yaml @@ -18,7 +18,7 @@ env: APP_DEBUG: false APP_LOG_LEVEL: info APP_URL: https://preparemessages.ifrc.org - API_URL: https://api-preparemessages.ifrc.org/api + API_URL: https://api-preparemessages.ifrc.org GOOGLE_MAPS_KEY: DB_CONNECTION: mysql DB_PORT: 3306 diff --git a/helm-chart-backoffice/values-staging.yaml b/helm-chart-backoffice/values-staging.yaml index c59ca8a..fc02954 100644 --- a/helm-chart-backoffice/values-staging.yaml +++ b/helm-chart-backoffice/values-staging.yaml @@ -18,7 +18,7 @@ env: APP_DEBUG: true APP_LOG_LEVEL: debug APP_URL: https://preparemessages-stage.ifrc.org - API_URL: https://api-preparemessages-stage.ifrc.org/api + API_URL: https://api-preparemessages-stage.ifrc.org GOOGLE_MAPS_KEY: DB_CONNECTION: mysql DB_PORT: 3306