Skip to content

Commit

Permalink
add env var overrides (#2042)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgrossman authored Mar 9, 2023
1 parent 220e5e5 commit ff93449
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions webpack-config/webpack.development.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const path = require( 'path' );
const { merge } = require( 'webpack-merge' );
const CommonConfig = require('./webpack.base.config');

const HOOT_SERVICES_HOST = process.env.HOOT_SERVICES_HOST || '127.0.0.1'
const HOOT_SERVICES_PORT = process.env.HOOT_SERVICES_PORT || '8888'
const HOOT_TM_HOST = process.env.HOOT_TM_HOST || '127.0.0.1'

module.exports = merge( CommonConfig, {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand All @@ -20,23 +24,23 @@ module.exports = merge( CommonConfig, {
publicPath: '/',
},
proxy: {
'/hoot-services': 'http://localhost:8888',
'/static': 'http://localhost:8888',
'/capabilities': 'http://localhost:8094',
'/hoot-services': `http://${HOOT_SERVICES_HOST}:${HOOT_SERVICES_PORT}`,
'/static': `http://${HOOT_SERVICES_HOST}:${HOOT_SERVICES_PORT}`,
'/capabilities': `http:${HOOT_SERVICES_HOST}:8094`,
'/switcher': {
target: 'http://localhost:8094',
target: `http://${HOOT_SERVICES_HOST}:8094`,
pathRewrite: { '^/switcher': '' }
},
'/p2p': {
target: 'http://localhost:8096',
target: `http://${HOOT_SERVICES_HOST}:8096`,
pathRewrite: { '^/p2p': '' }
},
'/tasks': {
target: 'http://localhost:6543',
target: `http://${HOOT_TM_HOST}:6543`,
pathRewrite: { '^/tasks': '' }
},
'/tm4api': {
target: 'http://localhost:5000',
target: `http://${HOOT_TM_HOST}:5000`,
pathRewrite: { '^/tm4api': '/api' }
}
}
Expand Down

0 comments on commit ff93449

Please sign in to comment.