Skip to content

Commit

Permalink
Respecting the COMPOSE_PROJECT_NAME env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
David Numan committed Feb 5, 2016
1 parent bba3d66 commit f6ce83c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bowline/bowline
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ check_proxy() {
unset PROXY_RUNNING PROXY_HOST_SET;
if [ "$(docker ps -q -f name=proxy_)" ];then
PROXY_RUNNING="true";
PROXY_HOST_SET=$(docker exec proxy_dnsmasq_1 grep "\s${BOWLINE}$" /etc/althosts|grep "$web_ip\s")
PROXY_HOST_SET=$(docker exec proxy_dnsmasq_1 grep "\s${SLUG}$" /etc/althosts|grep "$web_ip\s")
fi
}

Expand All @@ -23,6 +23,7 @@ bowline_init () {
cd $(dirname $0)
GIT_ROOT=$(git rev-parse --show-toplevel)
BOWLINE=${GIT_ROOT##*/}
if [ "${COMPOSE_PROJECT_NAME}" ];then BOWLINE=${COMPOSE_PROJECT_NAME}; fi
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
SLUG=${BOWLINE//-/} # Fig/Compose doesn't allow the - char.
SLUG=${SLUG//_/} # Fig/Compose doesn't allow the _ char.
Expand All @@ -38,6 +39,7 @@ bowline_init () {
exit 1
fi
fi
DCOMPOSE="$DCOMPOSE -p $SLUG"

cd $GIT_ROOT

Expand Down

0 comments on commit f6ce83c

Please sign in to comment.