I think i have just replied but did not displayed in the forum. Let me reply again.:
I have a docker AWX Tower setup running in 8080 port. Right now for developing the UI part of AWX tower I am using 3000 port after running this command.
`
make ui-docker
`
When I run it in browser with 8080
. It shows the AWX default logo however in the 3000
it shows me angry cartoon logo. I do not get auto update on browser localhost:3000
and I had to manually refresh after I get success message in commandline where it running make ui-docker
. I did not think https is a mandatory so right now I am running everything in http . For the reference of my webpack.watch.js I am pasting it in here just so that it might help to figure out the issue.
`
Enter code hconst path = require(‘path’);
const _ = require(‘lodash’);
const webpack = require(‘webpack’);
const merge = require(‘webpack-merge’);
const nodeObjectHash = require(‘node-object-hash’);
const HardSourceWebpackPlugin = require(‘hard-source-webpack-plugin’);
const HtmlWebpackHarddiskPlugin = require(‘html-webpack-harddisk-plugin’);
const TARGET_PORT = _.get(process.env, ‘npm_package_config_django_port’, 8080);
const TARGET_HOST = _.get(process.env, ‘npm_package_config_django_host’, ‘http://localhost’);
const TARGET = http://${TARGET_HOST}:${TARGET_PORT}
;
const OUTPUT = ‘js/[name].js’;
const development = require(‘./webpack.development’);
const watch = {
cache: true,
devtool: ‘cheap-source-map’,
output: {
filename: OUTPUT
},
module: {
rules: [
{
test: /.js$/,
enforce: ‘pre’,
exclude: /node_modules/,
loader: ‘eslint-loader’
}
]
},
plugins: [
new HtmlWebpackHarddiskPlugin(),
new HardSourceWebpackPlugin({
cacheDirectory: ‘node_modules/.cache/hard-source/[confighash]’,
recordsPath: ‘node_modules/.cache/hard-source/[confighash]/records.json’,
configHash: config => nodeObjectHash({ sort: false }).hash(config),
environmentHash: {
root: process.cwd(),
directories: [‘node_modules’],
files: [‘package.json’]
}
}),
new webpack.HotModuleReplacementPlugin()
],
devServer: {
hot: true,
inline: true,
contentBase: path.resolve(__dirname, ‘…’, ‘static’),
stats: ‘minimal’,
publicPath: ‘/static/’,
host: ‘0.0.0.0’,
disableHostCheck:true,
https: false,
port: 3000,
clientLogLevel: ‘none’,
watchContentBase: true,
proxy: [{
context: (pathname, req) => !(pathname === ‘/api/login/’ && req.method === ‘POST’),
target: TARGET,
secure: false,
ws: false,
bypass: req => req.originalUrl.includes(‘hot-update.json’)
},
{
context: ‘/api/login/’,
target: TARGET,
secure: false,
ws: false,
headers: {
Host: localhost:${TARGET_PORT}
,
Origin: TARGET,
Referer: ${TARGET}/
}
},
{
context: ‘/websocket’,
target: TARGET,
secure: false,
ws: true
}]
}
};
module.exports = merge(development, watch);
`
Thanks in advance