You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/06/27 14:28:16 UTC
[trafficcontrol] branch master updated: made changes to support
overriding the TO_HOST env var
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 4d40609 made changes to support overriding the TO_HOST env var
4d40609 is described below
commit 4d40609b3bafa6e1a1e807db370b4468ea22aa67
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Wed Jun 27 06:54:49 2018 -0600
made changes to support overriding the TO_HOST env var
---
infrastructure/cdn-in-a-box/docker-compose.yml | 2 --
infrastructure/cdn-in-a-box/traffic_portal/Dockerfile | 2 ++
infrastructure/cdn-in-a-box/traffic_portal/run.sh | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml
index c6abf78..d7a95a2 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -103,8 +103,6 @@ services:
context: traffic_portal
args:
TRAFFIC_PORTAL_RPM: traffic_portal.rpm
- depends_on:
- - trafficops
domainname: cdn.local
env_file:
- variables.env
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
index 6d55321..b6dbfb8 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
@@ -28,6 +28,8 @@ RUN curl -sL https://rpm.nodesource.com/setup_6.x | bash -
ARG TRAFFIC_PORTAL_RPM=traffic_portal.rpm
ADD $TRAFFIC_PORTAL_RPM /
+ARG TO_HOST=$TO_HOST
+
# Install and delete the TRAFFIC_PORTAL_RPM when finished
RUN yum install -y \
epel-release && \
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/run.sh b/infrastructure/cdn-in-a-box/traffic_portal/run.sh
index 6ea1ab9..43cd442 100755
--- a/infrastructure/cdn-in-a-box/traffic_portal/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_portal/run.sh
@@ -40,6 +40,8 @@ sed -i -e "/^\s*base_url:/ s@'.*'@'https://$TO_HOST:6443/api/'@" /etc/traffic_po
props=/opt/traffic_portal/public/traffic_portal_properties.json
tmp=$(mktemp)
+echo "TO_HOST: $TO_HOST"
+
jq --arg TO_HOST $TO_HOST '.properties.api.baseUrl = "https://"+$TO_HOST' <$props >$tmp
mv $tmp $props