Skip to content

Commit

Permalink
fix: fix docker variable
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Oct 1, 2024
1 parent 7f062b5 commit 3893848
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint-staged": "lint-staged --concurrent=false",
"test": "react-app-rewired test",
"build": "npm run copy-themes; INLINE_RUNTIME_CHUNK=false GENERATE_SOURCEMAP=false NODE_OPTIONS=--max-old-space-size=8192 vite build",
"build:docker": "npm run copy-themes; INLINE_RUNTIME_CHUNK=false GENERATE_SOURCEMAP=false NODE_OPTIONS=--max-old-space-size=8192 vite build -- --env IS_DOCKER=true",
"build:docker": "npm run copy-themes; INLINE_RUNTIME_CHUNK=false GENERATE_SOURCEMAP=false NODE_OPTIONS=--max-old-space-size=8192 VITE_IS_DOCKER=true vite build",
"copy-themes": "cp node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/css_variables.css public/themes/@sap-theming/default.css; for theme in hcb dark hcw ; do cp node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon_$theme/css_variables.css public/themes/@sap-theming/$theme.css ; done"
},
"eslintConfig": {
Expand Down
3 changes: 2 additions & 1 deletion src/state/utils/getBackendInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const getBackendAddress = () => {
// local busola - needed for e2e tests to work locally
if (
window.location.hostname.startsWith('localhost') &&
window.location.port === '8080'
window.location.port === '8080' &&
process.env.IS_DOCKER
) {
return 'http://127.0.0.1:3001/backend';
// dev busola
Expand Down
2 changes: 1 addition & 1 deletion vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default defineConfig({
]
},
define: {
'process.env.IS_DOCKER': JSON.stringify(process.env.IS_DOCKER),
'process.env.IS_DOCKER': JSON.stringify(process.env.VITE_IS_DOCKER || false),
},
});

Expand Down

0 comments on commit 3893848

Please sign in to comment.