1
0
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:
Jose Diaz-Gonzalez 2016-09-20 01:38:50 -06:00
parent 8848e945b9
commit dd3ac20c6d
3 changed files with 6 additions and 6 deletions

View File

@ -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 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

View File

@ -141,7 +141,7 @@ cd "$CUR_DIR"
# Add support for app-nginx.conf.sigil
if [ -f "$BUILD_DIR/app-nginx.conf.sigil" ] ; then
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
# Allow deprecated nginx.conf.erb
@ -151,8 +151,8 @@ if [ -f "$BUILD_DIR/nginx.conf.erb" ] ; then
# ...else, force default file
else
echo "-----> Using default nginx.conf.sigil"
cp conf/nginx.conf.sigil "$BUILD_DIR/nginx/nginx.conf.sigil"
echo "-----> Using default app-nginx.conf.sigil"
cp conf/app-nginx.conf.sigil "$BUILD_DIR/nginx/app-nginx.conf.sigil"
fi
# build mime.types unless overridden by user
@ -169,8 +169,8 @@ fi
cat <<EOF >"$BUILD_DIR/start_nginx"
#!/usr/bin/env bash
rm -f /app/nginx/nginx.conf
if [[ -f /app/nginx/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
if [[ -f /app/nginx/app-nginx.conf.sigil ]]; then
/app/sigil/sigil -f /app/nginx/app-nginx.conf.sigil NGINX_ROOT="\$NGINX_ROOT" PORT="\$PORT" | cat -s > /app/nginx/nginx.conf
else
erb /app/nginx/nginx.conf.erb > /app/nginx/nginx.conf
fi