This commit is contained in:
Michael Hobbs committed 2014-12-21 14:51:41 -08:00
1 parent ee32b05a36
commit 9322200eae
3 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ case "$1" in
echo "-----> Deploying $APP ..." echo "-----> Deploying $APP ..."
dokku deploy $APP dokku deploy $APP
echo "=====> Application deployed:" echo "=====> Application deployed:"
echo "$(dokku urls $APP | sed "s/^/ /")" dokku urls $APP | sed "s/^/ /"
echo echo
;; ;;
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
for app in $(ls -d $DOKKU_ROOT/*/CONTAINER); do for app in $DOKKU_ROOT/*/CONTAINER; do
APP=$(basename $(dirname $app)); APP=$(basename "$(dirname $app)");
dokku domains:setup $APP dokku domains:setup $APP
done done
+6 -6
View File
@@ -43,10 +43,10 @@ EOF
NGINX_CONF="$PLUGIN_PATH/nginx-vhosts/templates/nginx.ssl.conf" NGINX_CONF="$PLUGIN_PATH/nginx-vhosts/templates/nginx.ssl.conf"
SCHEME="https" SCHEME="https"
SSL_HOSTNAME=`openssl x509 -in $SSL_INUSE/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-` SSL_HOSTNAME=$(openssl x509 -in $SSL_INUSE/server.crt -noout -subject | tr '/' '\n' | grep CN= | cut -c4-)
SSL_HOSTNAME=`echo "$SSL_HOSTNAME" | sed 's|\.|\\.|g' | sed 's/\*/\.\*/g'` SSL_HOSTNAME=$(echo "$SSL_HOSTNAME" | sed 's|\.|\\.|g' | sed 's/\*/\.\*/g')
SSL_VHOSTS=`egrep ^"$SSL_HOSTNAME"$ $VHOST_PATH` SSL_VHOSTS=$(egrep ^"$SSL_HOSTNAME"$ $VHOST_PATH)
NONSSL_VHOSTS=`egrep -v ^"$SSL_HOSTNAME"$ $VHOST_PATH || exit 0` NONSSL_VHOSTS=$(egrep -v ^"$SSL_HOSTNAME"$ $VHOST_PATH || exit 0)
while read line; do while read line; do
echo "-----> Configuring SSL for $line..." echo "-----> Configuring SSL for $line..."
@@ -61,9 +61,9 @@ EOF
NGINX_CONF=$APP_NGINX_TEMPLATE NGINX_CONF=$APP_NGINX_TEMPLATE
fi fi
cat $VHOST_PATH | xargs -i echo "-----> Configuring {}..." xargs -i echo "-----> Configuring {}..." < $VHOST_PATH
# Include SSL_VHOSTS so we can redirect http to https on that hostname as well # Include SSL_VHOSTS so we can redirect http to https on that hostname as well
NOSSL_SERVER_NAME=`echo $NONSSL_VHOSTS $SSL_VHOSTS| tr '\n' ' '` NOSSL_SERVER_NAME=$(echo $NONSSL_VHOSTS $SSL_VHOSTS| tr '\n' ' ')
echo "-----> Creating $SCHEME nginx.conf" echo "-----> Creating $SCHEME nginx.conf"
echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf