Skip to content

Commit

Permalink
chore: make vite domain configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapalakshmi committed Oct 27, 2024
1 parent ad69665 commit a9dde22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/kyb-app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ -z "$VITE_DOMAIN" ]]
then
VITE_DOMAIN="localhost:3000"
VITE_DOMAIN="http://localhost:3000"
fi

if [[ -z "$VITE_API_KEY" ]]
Expand Down Expand Up @@ -33,7 +33,7 @@ fi

cat << EOF > /usr/share/nginx/html/config.js
globalThis.env = {
VITE_API_URL: "http://$VITE_DOMAIN/api/v1/",
VITE_API_URL: "$VITE_DOMAIN/api/v1/",
VITE_API_KEY: "$VITE_API_KEY",
VITE_ENVIRONMENT_NAME: "$VITE_ENVIRONMENT_NAME",
VITE_DEFAULT_EXAMPLE_TOKEN: "$VITE_DEFAULT_EXAMPLE_TOKEN",
Expand Down
14 changes: 7 additions & 7 deletions apps/kyb-app/public/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
globalThis.env = {
VITE_API_URL: 'http://google.com',
VITE_KYB_DEFINITION_ID: "kyb_parent_kyc_session_example",
VITE_API_KEY: "secret",
VITE_ENVIRONMENT_NAME: "local",
VITE_DEFAULT_EXAMPLE_TOKEN: 12345678-1234-1234-1234-123456789012,
VITE_SENTRY_AUTH_TOKEN: "",
VITE_SENTRY_DSN: "",
VITE_API_URL: import.meta.env.VITE_API_URL || 'http://google.com',
VITE_KYB_DEFINITION_ID: import.meta.env.VITE_KYB_DEFINITION_ID || 'kyb_parent_kyc_session_example',
VITE_API_KEY: import.meta.env.VITE_API_KEY || 'secret',
VITE_ENVIRONMENT_NAME: import.meta.env.VITE_ENVIRONMENT_NAME || 'local',
VITE_DEFAULT_EXAMPLE_TOKEN: import.meta.env.VITE_DEFAULT_EXAMPLE_TOKEN || '12345678-1234-1234-1234-123456789012',
VITE_SENTRY_AUTH_TOKEN: import.meta.env.VITE_SENTRY_AUTH_TOKEN || '',
VITE_SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN || '',
};

0 comments on commit a9dde22

Please sign in to comment.