mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-12-26 22:15:23 +00:00
Switch template to app-nginx.conf.sigil
This commit is contained in:
parent
8848e945b9
commit
dd3ac20c6d
@ -25,7 +25,7 @@ heroku buildpacks:set https://github.com/dokku/buildpack-nginx.git
|
|||||||
|
|
||||||
You can override the nginx root via setting the `NGINX_ROOT` environment variable. This should be a relative path in your repository.
|
You can override the nginx root via setting the `NGINX_ROOT` environment variable. This should be a relative path in your repository.
|
||||||
|
|
||||||
You may completely override the built-in nginx config by placing an `nginx.conf.sigil` file in the root, modeled after our own [`conf/nginx.config.sigil`](https://github.com/dokku/buildpack-nginx/blob/master/conf/nginx.conf.sigil). This will be used inside of the container, and not by the host Dokku instance. See the [sigil project](https://github.com/gliderlabs/sigil) for more information concerning the sigil format.
|
You may completely override the built-in nginx config by placing an `app-nginx.conf.sigil` file in the root, modeled after our own [`conf/app-nginx.conf.sigil`](https://github.com/dokku/buildpack-nginx/blob/master/conf/app-nginx.conf.sigil). This will be used inside of the container, and not by the host Dokku instance. See the [sigil project](https://github.com/gliderlabs/sigil) for more information concerning the sigil format.
|
||||||
|
|
||||||
## Credits and License
|
## Credits and License
|
||||||
|
|
||||||
|
10
bin/compile
10
bin/compile
@ -141,7 +141,7 @@ cd "$CUR_DIR"
|
|||||||
# Add support for app-nginx.conf.sigil
|
# Add support for app-nginx.conf.sigil
|
||||||
if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] ; then
|
if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] ; then
|
||||||
echo "-----> Using user provided app-nginx.conf.sigil"
|
echo "-----> Using user provided app-nginx.conf.sigil"
|
||||||
cp "$BUILD_DIR/app-nginx.conf.sigil" "$BUILD_DIR/nginx/nginx.conf.sigil"
|
cp "$BUILD_DIR/app-nginx.conf.sigil" "$BUILD_DIR/nginx/app-nginx.conf.sigil"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Allow deprecated nginx.conf.erb
|
# Allow deprecated nginx.conf.erb
|
||||||
@ -151,8 +151,8 @@ if [ -f "$BUILD_DIR/nginx.conf.erb" ] ; then
|
|||||||
|
|
||||||
# ...else, force default file
|
# ...else, force default file
|
||||||
else
|
else
|
||||||
echo "-----> Using default nginx.conf.sigil"
|
echo "-----> Using default app-nginx.conf.sigil"
|
||||||
cp conf/nginx.conf.sigil "$BUILD_DIR/nginx/nginx.conf.sigil"
|
cp conf/app-nginx.conf.sigil "$BUILD_DIR/nginx/app-nginx.conf.sigil"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build mime.types unless overridden by user
|
# build mime.types unless overridden by user
|
||||||
@ -169,8 +169,8 @@ fi
|
|||||||
cat <<EOF >"$BUILD_DIR/start_nginx"
|
cat <<EOF >"$BUILD_DIR/start_nginx"
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
rm -f /app/nginx/nginx.conf
|
rm -f /app/nginx/nginx.conf
|
||||||
if [[ -f /app/nginx/nginx.conf.sigil ]]; then
|
if [[ -f /app/nginx/app-nginx.conf.sigil ]]; then
|
||||||
/app/sigil/sigil -f /app/nginx/nginx.conf.sigil NGINX_ROOT="\$NGINX_ROOT" PORT="\$PORT" | cat -s > /app/nginx/nginx.conf
|
/app/sigil/sigil -f /app/nginx/app-nginx.conf.sigil NGINX_ROOT="\$NGINX_ROOT" PORT="\$PORT" | cat -s > /app/nginx/nginx.conf
|
||||||
else
|
else
|
||||||
erb /app/nginx/nginx.conf.erb > /app/nginx/nginx.conf
|
erb /app/nginx/nginx.conf.erb > /app/nginx/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user