replace slashes with dashes for hostname
This commit is contained in:
@@ -8,8 +8,8 @@ if [[ ! -f "$HOME/$APP/PORT" ]]; then
|
|||||||
PORT=$(docker inspect $ID | ruby -e 'require"json";puts JSON.parse(STDIN.read)["NetworkSettings"]["PortMapping"]["5000"]')
|
PORT=$(docker inspect $ID | ruby -e 'require"json";puts JSON.parse(STDIN.read)["NetworkSettings"]["PortMapping"]["5000"]')
|
||||||
echo $PORT > "$HOME/$APP/PORT"
|
echo $PORT > "$HOME/$APP/PORT"
|
||||||
if [[ -f "$HOME/DOMAIN" ]]; then
|
if [[ -f "$HOME/DOMAIN" ]]; then
|
||||||
HOSTNAME="$APP.$(< "$HOME/DOMAIN")"
|
HOSTNAME="${APP/\//-}.$(< "$HOME/DOMAIN")"
|
||||||
$HOME/nginx-app-conf $APP $PORT $HOSTNAME > $HOME/$APP/nginx.conf
|
$HOME/nginx-app-conf ${APP/\//-} $PORT $HOSTNAME > $HOME/$APP/nginx.conf
|
||||||
nc -U $HOME/reload-nginx
|
nc -U $HOME/reload-nginx
|
||||||
else
|
else
|
||||||
HOSTNAME="$(< "$HOME/HOSTNAME"):$PORT"
|
HOSTNAME="$(< "$HOME/HOSTNAME"):$PORT"
|
||||||
|
|||||||
Reference in New Issue
Block a user