mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-11-05 11:48:42 +00:00
commit
770f4feb42
19
bin/compile
19
bin/compile
@ -26,6 +26,8 @@ if [[ ! -e "$BUILD_DIR/www" ]]; then
|
|||||||
mv $BUILD_DIR/* $CACHE_DIR/www
|
mv $BUILD_DIR/* $CACHE_DIR/www
|
||||||
mkdir -p $BUILD_DIR/www
|
mkdir -p $BUILD_DIR/www
|
||||||
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
||||||
|
# Check for an 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/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
|
[[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
|
||||||
rm -rf $CACHE_DIR/www
|
rm -rf $CACHE_DIR/www
|
||||||
fi
|
fi
|
||||||
@ -108,11 +110,18 @@ fi
|
|||||||
|
|
||||||
cd $CUR_DIR
|
cd $CUR_DIR
|
||||||
|
|
||||||
# build nginx config unless overridden by user
|
|
||||||
#if [ ! -f $BUILD_DIR/nginx/nginx.conf ] ; then
|
# Test for user override on nginx config...
|
||||||
echo "-----> using default nginx.conf.erb"
|
if [ -f $BUILD_DIR/nginx.conf.erb ] ; then
|
||||||
cp conf/nginx.conf.erb $BUILD_DIR/nginx/nginx.conf.erb
|
echo "-----> using user provided nginx.conf.erb"
|
||||||
#fi
|
cp $BUILD_DIR/nginx.conf.erb $BUILD_DIR/nginx/nginx.conf.erb
|
||||||
|
rm $BUILD_DIR/nginx.conf.erb
|
||||||
|
|
||||||
|
# ...else, force default file
|
||||||
|
else
|
||||||
|
echo "-----> using default nginx.conf.erb"
|
||||||
|
cp conf/nginx.conf.erb $BUILD_DIR/nginx/nginx.conf.erb
|
||||||
|
fi
|
||||||
|
|
||||||
# build mime.types unless overridden by user
|
# build mime.types unless overridden by user
|
||||||
#if [ ! -f $BUILD_DIR/mime.types ] ; then
|
#if [ ! -f $BUILD_DIR/mime.types ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user