#!/bin/bash # latest stable NGINX 1.4.x with websocket support add-apt-repository -y ppa:nginx/stable apt-get update apt-get install -y nginx dnsutils cat< /etc/init/nginx-reloader.conf description "Dokku nginx reloader service" start on runlevel [2345] stop on runlevel [!2345] script [[ -f /home/git/reload-nginx ]] && rm -rf /home/git/reload-nginx echo | sudo -u git nc -l -U /home/git/reload-nginx && /etc/init.d/nginx reload end script respawn EOF echo "include /home/git/*/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/git/VHOST /etc/init.d/nginx start start nginx-reloader || true