At the moment the command line only allows customisation of port number, not host/IP address. Because it is fixed to 'localhost', when running from within a docker container running on a VM (docker machine), I cannot access it (I need to change it to 0.0.0.0:8000).
vue ui -h 0.0.0.0
as a dirty work around: run this somewhere (eg: Dockerfile, entrypoint) before running vue ui
:
sed -i 's/subscriptionsPath/host: "0.0.0.0", subscriptionsPath/' /usr/local/share/.config/yarn/global/node_modules/@vue/cli/lib/ui.js
Nice, thanks.
FYI when installed via NPM, is located at /usr/local/lib/node_modules/@vue/cli/lib/ui.js
Will see if I get time in the coming weeks to implement this feature properly in a PR now that I know where to look.
thanks @mathroc and @assembledadam!
docker example for npm:
RUN npm install -g @vue/cli; \
sed -i 's/subscriptionsPath/host: "0.0.0.0", subscriptionsPath/' /usr/local/lib/node_modules/@vue/cli/lib/ui.js
The --host
option was merged in #2568 and should resolve this.
Most helpful comment
The
--host
option was merged in #2568 and should resolve this.