Skip to content

Commit

Permalink
fix: add config url env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-buiquang committed Nov 20, 2024
1 parent 8f21820 commit cef9bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e
sed -i "s@{FHIR_URL}@$FHIR_URL@g" /etc/nginx/conf.d/nginx.conf
sed -i "s@{BACK_URL}@$BACK_URL@g" /etc/nginx/conf.d/nginx.conf

sed -i "s@{VITE_CONFIG_URL}@$VITE_CONFIG_URL@g" /app/build/assets/*.js

sed -i "s@{VITE_CLARITY_APP_ID}@$VITE_CLARITY_APP_ID@g" /app/build/index.html

Expand Down
5 changes: 3 additions & 2 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const ENV_CONFIG_URL = import.meta.env.DEV ? import.meta.env.VITE_CONFIG_URL : '{VITE_CONFIG_URL}'
export const CONFIG_URL =
ENV_CONFIG_URL === '{' + 'VITE_CONFIG_URL' + '}' ? '/config.json' : ENV_CONFIG_URL || '/config.json'
export const CONFIG_URL = !!`${ENV_CONFIG_URL}`.match('VITE_CONFIG_URL')
? '/config.json'
: `${ENV_CONFIG_URL}` || '/config.json'

export const ACCESS_TOKEN = 'access_token'
export const REFRESH_TOKEN = 'refresh_token'
Expand Down

0 comments on commit cef9bd3

Please sign in to comment.