diff --git a/Makefile b/Makefile index 0ead1be..bf2b33c 100644 --- a/Makefile +++ b/Makefile @@ -43,11 +43,11 @@ bootstrap: up: launch mount bootstrap ssh ## Start a VM -fwd: ## Forward app port: make app=prometheus port=9090 fwd +fwd: ## Forward app port: make unit=prometheus/0 port=9090 fwd $(eval VMIP := $(shell multipass exec $(VM_NAME) -- hostname -I | cut -d' ' -f1)) echo "Opening browser: http://$(VMIP):$(port)" bash -c "(sleep 1; open 'http://$(VMIP):$(port)') &" - multipass exec $(VM_NAME) -- juju ssh $(app)/0 -N -L 0.0.0.0:$(port):0.0.0.0:$(port) + multipass exec $(VM_NAME) -- juju ssh $(unit) -N -L 0.0.0.0:$(port):0.0.0.0:$(port) down: ## Stop the VM multipass down $(VM_NAME)