From f81a6fadf2d2198c888c3350d3db9c43e6a3d044 Mon Sep 17 00:00:00 2001 From: JoolsoftAdmin Date: Fri, 9 Aug 2024 13:47:21 +0700 Subject: [PATCH] set env --- .env.production | 1 + entrypoint.sh | 1 + src/api/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 3cd7d30..08cefb5 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ VITE_API_URI_CONFIG=VITE_API_URI_CONFIG +VITE_API_URI_CONFIG2=VITE_API_URI_CONFIG2 VITE_REALM_KEYCLOAK=VITE_REALM_KEYCLOAK VITE_CLIENTID_KEYCLOAK=VITE_CLIENTID_KEYCLOAK VITE_URL_KEYCLOAK=VITE_URL_KEYCLOAK \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 59762b4..135c239 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,6 +9,7 @@ do echo "Processing $file ..."; sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file + sed -i 's|VITE_API_URI_CONFIG2|'${VITE_API_URI_CONFIG2}'|g' $file sed -i 's|VITE_REALM_KEYCLOAK|'${VITE_REALM_KEYCLOAK}'|g' $file sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file diff --git a/src/api/index.ts b/src/api/index.ts index b1d071a..6627689 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -2,8 +2,8 @@ import { ref } from 'vue' const env = ref(process.env.NODE_ENV || 'development') -export const apiUrlConfig = `${import.meta.env.VITE_API_URI_CONFIG}/v1` -export const apiUrlConfigV2 = `${import.meta.env.VITE_API_URI_CONFIG}/v2` +export const apiUrlConfig = `${import.meta.env.VITE_API_URI_CONFIG}` +export const apiUrlConfigV2 = `${import.meta.env.VITE_API_URI_CONFIG2}` const config = ref({ development: {