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 6815de4 commit fad5a3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions apps/backoffice-v2/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 @@ -38,7 +38,7 @@ fi

cat << EOF > /usr/share/nginx/html/config.js
globalThis.env = {
VITE_API_URL: "http://$VITE_DOMAIN/api/v1/internal",
VITE_API_URL: "$VITE_DOMAIN/api/v1/internal",
VITE_API_KEY: "$VITE_API_KEY",
VITE_AUTH_ENABLED: "$VITE_AUTH_ENABLED",
VITE_MOCK_SERVER: "$VITE_MOCK_SERVER",
Expand Down
16 changes: 7 additions & 9 deletions apps/backoffice-v2/public/config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
globalThis.env = {
VITE_API_URL: "http://google.com",
VITE_API_KEY: "secret",
VITE_AUTH_ENABLED: true,
VITE_MOCK_SERVER: false,
VITE_POLLING_INTERVAL: 10,
VITE_ASSIGNMENT_POLLING_INTERVAL: 5,
VITE_FETCH_SIGNED_URL: false,
VITE_ENVIRONMENT_NAME: "local",
MODE: "production"
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 fad5a3c

Please sign in to comment.