mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-11-22 01:13:06 +00:00
Merge pull request #11 from kmattimo/master
restored ability to use custom mime.types
This commit is contained in:
commit
9d273c7607
16
bin/compile
16
bin/compile
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user