diff --git a/.env b/.env index 83f54f408..cca2be102 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ -REACT_APP_XPANSE_API_URL='http://localhost:8080' -REACT_APP_ZITADEL_SCOPE='openid profile urn:zitadel:iam:org:projects:roles urn:zitadel:iam:user:metadata' -REACT_APP_ZITADEL_REDIRECT_URI='/authentication/callback' -REACT_APP_ZITADEL_SILENT_REDIRECT_URI='/authentication/silent-callback' -REACT_APP_ZITADEL_AUTHORITY_URL='http://localhost:8081' -REACT_APP_ZITADEL_CLIENT_ID='' -REACT_APP_AUTH_USE_SERVICE_WORKER_ONLY=false \ No newline at end of file +VITE_APP_XPANSE_API_URL='http://localhost:8080' +VITE_APP_ZITADEL_SCOPE='openid profile urn:zitadel:iam:org:projects:roles urn:zitadel:iam:user:metadata' +VITE_APP_ZITADEL_REDIRECT_URI='/authentication/callback' +VITE_APP_ZITADEL_SILENT_REDIRECT_URI='/authentication/silent-callback' +VITE_APP_ZITADEL_AUTHORITY_URL='http://localhost:8081' +VITE_APP_ZITADEL_CLIENT_ID='' +VITE_APP_AUTH_USE_SERVICE_WORKER_ONLY=false \ No newline at end of file diff --git a/.env.zitadel-testbed b/.env.zitadel-testbed index d144f2313..5cd976820 100644 --- a/.env.zitadel-testbed +++ b/.env.zitadel-testbed @@ -1,2 +1,2 @@ -REACT_APP_ZITADEL_AUTHORITY_URL='https://iam.xpanse.site' -REACT_APP_ZITADEL_CLIENT_ID=221692308037369859@eclipse-xpanse \ No newline at end of file +VITE_APP_ZITADEL_AUTHORITY_URL='https://iam.xpanse.site' +VITE_APP_ZITADEL_CLIENT_ID=221692308037369859@eclipse-xpanse \ No newline at end of file diff --git a/.gitignore b/.gitignore index f57a04893..dbbd46d02 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ node_modules .history *.db build -*.zip \ No newline at end of file +*.zip +dist \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 820f8187e..6b2ba280e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ -build +dist public/OidcServiceWorker.js \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index b3eaea097..569b92273 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,7 @@ FROM nginx:1.26.0-alpine WORKDIR /usr/share/nginx/html RUN apk add --no-cache bash envsubst COPY docker/nginx-entrypoint.sh / -COPY build/ /usr/share/nginx/html +COPY dist/ /usr/share/nginx/html COPY docker/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 3000 diff --git a/docker/nginx-entrypoint.sh b/docker/nginx-entrypoint.sh index 558f6d93c..e9ca2d06c 100644 --- a/docker/nginx-entrypoint.sh +++ b/docker/nginx-entrypoint.sh @@ -7,7 +7,7 @@ # the script reads all available environment vars with names starting with REACT_APP_ and adds them to the # inject.js file as a JS object. WWW_DIR=/usr/share/nginx/html -ENV_PREFIX=REACT_APP_ +ENV_PREFIX=VITE_APP_ INJECT_FILE_PATH="${WWW_DIR}/inject.js" rm -f ${INJECT_FILE_PATH} echo "window.injectedEnv = {" >> "${INJECT_FILE_PATH}" diff --git a/public/index.html b/index.html similarity index 83% rename from public/index.html rename to index.html index 12c5faa34..7b5b73f1a 100644 --- a/public/index.html +++ b/index.html @@ -11,11 +11,11 @@