1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2024-12-27 14:25:24 +00:00

User provided nginx conf

This commit is contained in:
James Wigley 2016-10-01 19:24:40 +10:00
parent dd3ac20c6d
commit 2e8fe7300c

View File

@ -138,17 +138,20 @@ EOF
cd "$CUR_DIR" cd "$CUR_DIR"
# Add support for app-nginx.conf.sigil # Check for user provided nginx conf
if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] ; then if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] || [ -f "$BUILD_DIR/nginx.conf.erb" ] ; then
echo "-----> Using user provided app-nginx.conf.sigil"
cp "$BUILD_DIR/app-nginx.conf.sigil" "$BUILD_DIR/nginx/app-nginx.conf.sigil"
fi
# Allow deprecated nginx.conf.erb # Add support for app-nginx.conf.sigil
if [ -f "$BUILD_DIR/nginx.conf.erb" ] ; then if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] ; then
echo "-----> DEPRECATED: using user provided nginx.conf.erb" echo "-----> Using user provided app-nginx.conf.sigil"
cp "$BUILD_DIR/nginx.conf.erb" "$BUILD_DIR/nginx/nginx.conf.erb" cp "$BUILD_DIR/app-nginx.conf.sigil" "$BUILD_DIR/nginx/app-nginx.conf.sigil"
fi
# Allow deprecated nginx.conf.erb
if [ -f "$BUILD_DIR/nginx.conf.erb" ] ; then
echo "-----> DEPRECATED: using user provided nginx.conf.erb"
cp "$BUILD_DIR/nginx.conf.erb" "$BUILD_DIR/nginx/nginx.conf.erb"
fi
# ...else, force default file # ...else, force default file
else else
echo "-----> Using default app-nginx.conf.sigil" echo "-----> Using default app-nginx.conf.sigil"