Skip to content

Commit

Permalink
fix(build): issues/34 dotenv restructure, correct locale path
Browse files Browse the repository at this point in the history
* build, dotenv restructure towards .env as primary config
* build, locale path fixed
* router, minor path update for primary view
  • Loading branch information
cdcabrera committed Jul 24, 2019
1 parent a9c63db commit b926902
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ REACT_APP_AJAX_TIMEOUT=60000

REACT_APP_CONFIG_SERVICE_LOCALES_DEFAULT_LNG=en
REACT_APP_CONFIG_SERVICE_LOCALES_DEFAULT_LNG_DESC=English
REACT_APP_CONFIG_SERVICE_LOCALES=./locales/locales.json
REACT_APP_CONFIG_SERVICE_LOCALES_PATH=./locales/{{lng}}.json
REACT_APP_CONFIG_SERVICE_LOCALES=${UI_DEPLOY_PATH_PREFIX}/apps/subscription-reporting/locales/locales.json
REACT_APP_CONFIG_SERVICE_LOCALES_PATH=${UI_DEPLOY_PATH_PREFIX}/apps/subscription-reporting/locales/{{lng}}.json
REACT_APP_CONFIG_SERVICE_LOCALES_EXPIRE=604800000

REACT_APP_INCLUDE_CONTENT_HEADER=<esi:include src="${UI_DEPLOY_PATH_PREFIX}/apps/chrome/snippets/head.html" />
REACT_APP_INCLUDE_CONTENT_BODY=<esi:include src="${UI_DEPLOY_PATH_PREFIX}/apps/chrome/snippets/body.html" />

REACT_APP_SERVICES_RHSM_REPORT_RHEL=/api/rhsm-subscriptions/v1/tally/products/RHEL
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ REACT_APP_ENV=development
REACT_APP_INCLUDE_CONTENT_HEADER=<!-- esi:include placeholder -->
REACT_APP_INCLUDE_CONTENT_BODY=<div id="root"></div>

REACT_APP_CONFIG_SERVICE_LOCALES=./locales/locales.json
REACT_APP_CONFIG_SERVICE_LOCALES_PATH=./locales/{{lng}}.json

REACT_APP_SERVICES_RHSM_REPORT_RHEL=http://localhost:5000/api/rhsm-subscriptions/v1/tally/products/RHEL
3 changes: 0 additions & 3 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ GENERATE_SOURCEMAP=true

REACT_APP_ENV=production
REACT_APP_UI_VERSION=${UI_VERSION}

REACT_APP_INCLUDE_CONTENT_HEADER=<esi:include src="${UI_DEPLOY_PATH_PREFIX}/apps/chrome/snippets/head.html" />
REACT_APP_INCLUDE_CONTENT_BODY=<esi:include src="${UI_DEPLOY_PATH_PREFIX}/apps/chrome/snippets/body.html" />
6 changes: 2 additions & 4 deletions .env.proxy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ PORT=5001

REACT_APP_ENV=review

REACT_APP_INCLUDE_CONTENT_HEADER='<esi:include src="/apps/chrome/snippets/head.html" />'
REACT_APP_INCLUDE_CONTENT_BODY='<esi:include src="/apps/chrome/snippets/body.html" />'

REACT_APP_SERVICES_RHSM_REPORT_RHEL=/api/rhsm-subscriptions/v1/tally/products/RHEL
REACT_APP_CONFIG_SERVICE_LOCALES=./locales/locales.json
REACT_APP_CONFIG_SERVICE_LOCALES_PATH=./locales/{{lng}}.json
3 changes: 2 additions & 1 deletion src/components/router/routerTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const routes = [
id: 'rhel',
to: '/rhel',
redirect: true,
component: RhelView
component: RhelView,
exact: true
}
];

Expand Down

0 comments on commit b926902

Please sign in to comment.