diff --git a/bootstrap.sh b/bootstrap.sh index fc053a1bb..34ff9af82 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,7 +19,11 @@ start nginx-reloader /etc/init.d/nginx start echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf -echo $HOSTNAME > /home/git/DOMAIN +if [[ $(dig +short $HOSTNAME) ]]; then + echo $HOSTNAME > /home/git/DOMAIN +else + echo $HOSTNAME > /home/git/HOSTNAME +fi echo echo "Be sure to upload a public key for your user:" diff --git a/buildstep b/buildstep index 9427d1644..50900d9c0 160000 --- a/buildstep +++ b/buildstep @@ -1 +1 @@ -Subproject commit 9427d1644142677b10e2e0487a4c16413a61b4a3 +Subproject commit 50900d9c01a047e5c1d40cd69c1b3192958fc4ad diff --git a/deploystep b/deploystep index 01f1ad708..7c546fbfb 100755 --- a/deploystep +++ b/deploystep @@ -14,7 +14,7 @@ if [[ ! -f "$HOME/$APP/PORT" ]]; then $HOME/nginx-app-conf $APP $PORT $HOSTNAME > $HOME/$APP/nginx.conf nc -U $HOME/reload-nginx else - HOSTNAME="$(hostname -i | cut -d' ' -f3):$PORT" + HOSTNAME="$(< "$HOME/HOSTNAME"):$PORT" fi echo $HOSTNAME > "$HOME/$APP/HOSTNAME" else