From 35deb0be3767c9c751ad2c3d6f3748427a1d887d Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Wed, 25 Jan 2017 18:34:18 -0500 Subject: [PATCH] Simplify UI / Docker targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed npm scripts to reflect what they are actually doing. Nothing is being built here! - Not sure why the default django_host was 0.0.0.0… - Removed unnecessary logic from build-docker-cid --- Makefile | 4 ++-- awx/ui/package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 42f261eb96..3e915d7c07 100644 --- a/Makefile +++ b/Makefile @@ -577,11 +577,11 @@ $(UI_DEPS_FLAG_FILE): touch $(UI_DEPS_FLAG_FILE) ui-docker-machine: $(UI_DEPS_FLAG_FILE) - $(NPM_BIN) --prefix awx/ui run build-docker-machine -- $(MAKEFLAGS) + $(NPM_BIN) --prefix awx/ui run ui-docker-machine -- $(MAKEFLAGS) # Native docker. Builds UI and raises BrowserSync & filesystem polling. ui-docker: $(UI_DEPS_FLAG_FILE) - $(NPM_BIN) --prefix awx/ui run build-docker-cid -- $(MAKEFLAGS) + $(NPM_BIN) --prefix awx/ui run ui-docker -- $(MAKEFLAGS) # Builds UI with development UI without raising browser-sync or filesystem polling. ui-devel: $(UI_DEPS_FLAG_FILE) diff --git a/awx/ui/package.json b/awx/ui/package.json index 76a0fad388..ff96d33b42 100644 --- a/awx/ui/package.json +++ b/awx/ui/package.json @@ -7,15 +7,15 @@ }, "config": { "django_port": "8043", - "django_host": "0.0.0.0", + "django_host": "localhost" }, "engines": { "node": "^6.3.1", "npm": "^3.10.3" }, "scripts": { - "build-docker-machine": "ip=$(docker-machine ip $DOCKER_MACHINE_NAME); npm set ansible-tower:django_host ${ip}; grunt dev;", - "build-docker-cid": "ip=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $DOCkER_CID` | npm set config ansible-tower:django_host ${ip}; grunt dev;", + "ui-docker-machine": "ip=$(docker-machine ip $DOCKER_MACHINE_NAME); npm set ansible-tower:django_host ${ip}; grunt dev;", + "ui-docker": "grunt dev;", "build-devel": "grunt devNoSync", "pot": "grunt nggettext_extract", "languages": "grunt nggettext_compile",