Proxy for the insightsfrontend container
This container uses https://github.com/redhataccess/spandx which provides ESI and some nifty routing tools.
Checkout the spandx
docs for additional config options.
$ sudo bash scripts/patch-etc-hosts.sh
$ bash scripts/update.sh
$ bash scripts/run.sh
$ LOCAL_API=true bash scripts/run.sh
$ cd ~/path/to/chrome/directory
$ LOCAL_CHROME=true bash ~/path/to/insights-proxy/scripts/run.sh
$ SPANDX_CONFIG=/path/to/custom/config.js bash ~/path/to/insights-proxy/scripts/run.sh
Note to macOS and Windows users using Docker Machine: You have to set-up forwarding of the port 1337 through the VirtualBox network interface. The machine has to be stopped for this command to succeed.
VBoxManage modifyvm "default" --natpf1 "insights,tcp,,1337,,1337"
The insights-proxy container utilizes several rewrite rules; including one for host.docker.internal
which will resolve to the internal IP address used by the host. This special DNS name is stable from version 18.03 for Linux & macOS, however for previous versions the DNS name varied for macOS, see Stack Overflow. If you are using a version of Docker older than 18.03 on macOS, you will need to either upgrade your Docker version or update you spandx.config.js to map to the appropriate DNS name for your version.