Use DOKKU_ROOT instead of HOME.

HOME is not consistent if dokku is ran e.g. as root (for setup).
The DOKKU_ROOT variable will also make it possible to have the repositories stored in an arbitrary location (works-ish right now)
This commit is contained in:
Paul Lietar
2013-10-28 00:30:10 +00:00
parent e04f271d8e
commit b5c8dd7436
8 changed files with 37 additions and 35 deletions

View File

@@ -13,10 +13,10 @@ if ! grep -q dokku-nginx-reload "/etc/sudoers"; then
rm /tmp/sudoers.new
fi
echo "include $HOME/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf
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 $HOSTNAME) ]] && echo $HOSTNAME > $HOME/VHOST
[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME > $DOKKU_ROOT/VHOST
/etc/init.d/nginx start