1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2024-11-05 11:48:42 +00:00

Merge pull request #5 from florianheinemann/master

Merge upstream florianheinemann/buildpack-nginx
This commit is contained in:
Jose Diaz-Gonzalez 2016-09-19 23:04:18 -06:00 committed by GitHub
commit e1efa9a3a2

View File

@ -4,8 +4,8 @@
set -e
set -o pipefail
# Nginx 1.6.2
NGINX_VERSION="1.6.2"
# Nginx 1.8.1
NGINX_VERSION="1.8.1"
NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz"
PCRE_VERSION="8.38"
PCRE_TARBALL="pcre-${PCRE_VERSION}.tar.gz"
@ -26,8 +26,9 @@ if [[ ! -e "$BUILD_DIR/www" ]]; then
mv $BUILD_DIR/* $CACHE_DIR/www
mkdir -p $BUILD_DIR/www
mv $CACHE_DIR/www/* $BUILD_DIR/www
# Check for an copy the nginx conf file override to the build dir
# 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/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
fi
@ -130,10 +131,15 @@ else
fi
# build mime.types unless overridden by user
#if [ ! -f $BUILD_DIR/mime.types ] ; then
echo "-----> using default mime.types"
cp conf/mime.types $BUILD_DIR/nginx/mime.types
#fi
if [ -f $BUILD_DIR/mime.types ] ; then
echo "-----> using user provided mime.types"
cp $BUILD_DIR/mime.types $BUILD_DIR/nginx/mime.types
else
echo "-----> using default mime.types"
cp conf/mime.types $BUILD_DIR/nginx/mime.types
fi
# build a startup script
cat <<EOF >"$BUILD_DIR/start_nginx"