Don't overwrite $DOKKU_ROOT/{HOSTNAME,VHOST}

This commit is contained in:
rhy-jot
2013-11-18 11:49:44 -08:00
parent da11349e81
commit 805c5a27c6
2 changed files with 6 additions and 3 deletions

View File

@@ -3,8 +3,9 @@ set -eo pipefail
sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf
echo $(hostname -f) > $DOKKU_ROOT/HOSTNAME
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
echo $(hostname -f) > $DOKKU_ROOT/HOSTNAME
fi
# temporary hack for https://github.com/progrium/dokku/issues/82
# redeploys all apps after a reboot

View File

@@ -18,6 +18,8 @@ echo "include $DOKKU_ROOT/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf
sed -i 's/# server_names_hash_bucket_size/server_names_hash_bucket_size/' /etc/nginx/nginx.conf
[[ $(dig +short $(< "$DOKKU_ROOT/HOSTNAME")) ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
[[ $(dig +short $(< "$DOKKU_ROOT/HOSTNAME")) ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
fi
/etc/init.d/nginx start