From 1dbee90d34ef1d209776af349940469c2a3cbe00 Mon Sep 17 00:00:00 2001 From: Pierre Erraud Date: Mon, 7 Sep 2020 10:22:03 +0200 Subject: [PATCH] feat: allows to change the Pilot URL in the web UI in dev mode --- Makefile | 4 +++- webui/Dockerfile | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24513ef18..072a88f07 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INT PRE_TARGET ?= build-dev-image +PLATFORM_URL := $(if $(PLATFORM_URL),$(PLATFORM_URL),"https://pilot.traefik.io") + default: binary ## Build Dev Docker image @@ -53,7 +55,7 @@ dist: ## Build WebUI Docker image build-webui-image: - docker build -t traefik-webui -f webui/Dockerfile webui + docker build -t traefik-webui --build-arg ARG_PLATFORM_URL=$(PLATFORM_URL) -f webui/Dockerfile webui ## Generate WebUI generate-webui: build-webui-image diff --git a/webui/Dockerfile b/webui/Dockerfile index f7d42974e..539204030 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -1,6 +1,8 @@ FROM node:12.18 ENV WEBUI_DIR /src/webui +ARG ARG_PLATFORM_URL=https://pilot.traefik.io +ENV PLATFORM_URL=${ARG_PLATFORM_URL} RUN mkdir -p $WEBUI_DIR COPY package.json $WEBUI_DIR/