From 3a20517687a8bd159ee15a14f225a769ca053998 Mon Sep 17 00:00:00 2001 From: Dennis Martinez Date: Wed, 27 Apr 2016 15:31:46 +0900 Subject: [PATCH 1/3] Check for existence of nginx.conf.sigil for Dokku 0.5.0+ --- bin/compile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 593befe..3c6b8eb 100755 --- a/bin/compile +++ b/bin/compile @@ -122,7 +122,12 @@ cd $CUR_DIR if [ -f $BUILD_DIR/nginx.conf.erb ] ; then echo "-----> using user provided nginx.conf.erb" cp $BUILD_DIR/nginx.conf.erb $BUILD_DIR/nginx/nginx.conf.erb - #rm $BUILD_DIR/nginx.conf.erb + +# Dokku 0.5.0+ uses nginx.conf.sigil for customizing the +# Nginx configuration, so let's check if it exists +if [ -f $BUILD_DIR/nginx.conf.sigil ] ; then + echo "-----> using user provided nginx.conf.sigil" + cp $BUILD_DIR/nginx.conf.sigil $BUILD_DIR/nginx/nginx.conf.sigil # ...else, force default file else From 640f6d396a7793e12d72ec7ce35ae2dd214cea6a Mon Sep 17 00:00:00 2001 From: Dennis Martinez Date: Wed, 27 Apr 2016 15:34:27 +0900 Subject: [PATCH 2/3] Syntax error for Bash --- bin/compile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 3c6b8eb..4b3551d 100755 --- a/bin/compile +++ b/bin/compile @@ -125,7 +125,7 @@ if [ -f $BUILD_DIR/nginx.conf.erb ] ; then # Dokku 0.5.0+ uses nginx.conf.sigil for customizing the # Nginx configuration, so let's check if it exists -if [ -f $BUILD_DIR/nginx.conf.sigil ] ; then +elif [ -f $BUILD_DIR/nginx.conf.sigil ] ; then echo "-----> using user provided nginx.conf.sigil" cp $BUILD_DIR/nginx.conf.sigil $BUILD_DIR/nginx/nginx.conf.sigil From 9c43925facf25aa5cdf38c13d0e248165c58c55c Mon Sep 17 00:00:00 2001 From: Dennis Martinez Date: Wed, 27 Apr 2016 15:36:18 +0900 Subject: [PATCH 3/3] Forgot to copy over nginx.conf.sigil to the build directory --- bin/compile | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/compile b/bin/compile index 4b3551d..9d05183 100755 --- a/bin/compile +++ b/bin/compile @@ -28,6 +28,7 @@ if [[ ! -e "$BUILD_DIR/www" ]]; then mv $CACHE_DIR/www/* $BUILD_DIR/www # Check for a copy the nginx conf file override to the build dir [[ -f "$BUILD_DIR/www/nginx.conf.erb" ]] && mv $BUILD_DIR/www/nginx.conf.erb $BUILD_DIR + [[ -f "$BUILD_DIR/www/nginx.conf.sigil" ]] && mv $BUILD_DIR/www/nginx.conf.sigil $BUILD_DIR [[ -f "$BUILD_DIR/www/mime.types" ]] && mv $BUILD_DIR/www/mime.types $BUILD_DIR [[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR rm -rf $CACHE_DIR/www