From a06d27ab45cf896842bdad52e9283c1e20c22b1d Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Fri, 15 Nov 2013 01:06:58 +0000 Subject: [PATCH 1/2] Use the FQDN to setup the HOSTNAME and VHOST files. The HOSTNAME environment var only contains the first part of the domain name. Use the fqdn to have it entirely. --- plugins/00_dokku-standard/install | 2 +- plugins/nginx-vhosts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/00_dokku-standard/install b/plugins/00_dokku-standard/install index f1b46c436..c7a2913a8 100755 --- a/plugins/00_dokku-standard/install +++ b/plugins/00_dokku-standard/install @@ -3,7 +3,7 @@ set -eo pipefail sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf -echo $HOSTNAME > $DOKKU_ROOT/HOSTNAME +echo $(hostname -f) > $DOKKU_ROOT/HOSTNAME # temporary hack for https://github.com/progrium/dokku/issues/82 diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 447f39894..c919b2d2e 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -18,6 +18,6 @@ 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 > $DOKKU_ROOT/VHOST +[[ $(dig +short $(< "$DOKKU_ROOT/HOSTNAME")) ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST" /etc/init.d/nginx start From ea663d13d3f0b8c0344b63a94b91aa35b7c2708c Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Fri, 15 Nov 2013 02:52:20 +0000 Subject: [PATCH 2/2] Set the hostname of the ci receiver correctly. --- tests/ci/receiver | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ci/receiver b/tests/ci/receiver index 9b9b50a3d..a0496f95c 100755 --- a/tests/ci/receiver +++ b/tests/ci/receiver @@ -11,8 +11,10 @@ if [[ $2 == *dokku* ]]; then tar -xf - echo "-----> Installing dependencies" DEBIAN_FRONTEND=noninteractive apt-get install -y git make curl software-properties-common + echo "-----> Set hostname to dokku.me" + hostname dokku.me echo "-----> Running make install" - DEBIAN_FRONTEND=noninteractive HOSTNAME=dokku.me make install + DEBIAN_FRONTEND=noninteractive make install echo "-----> Generating keypair..." echo -e "y\n" | ssh-keygen -f /root/.ssh/id_rsa -t rsa -N '' echo "-----> Installing SSH public key..."