mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2025-06-26 18:40:45 +00:00
Compare commits
17 Commits
v20
...
61bfffb6c6
Author | SHA1 | Date | |
---|---|---|---|
61bfffb6c6 | |||
bcbf61b1f5 | |||
8345d0a22a | |||
8560e5b5a9 | |||
aa191df661 | |||
7fe92f4821 | |||
25fb7889a5 | |||
6381244e26 | |||
7874622b04 | |||
0329f9e0ff | |||
043965bc7d | |||
3a1e442373 | |||
6a99e870e4 | |||
ad5e831e74 | |||
ed31137f94 | |||
a68149bce7 | |||
6a592755ff |
@ -39,7 +39,7 @@ By default, this buildpack will 404 if a requested file is not found. For static
|
||||
```shell
|
||||
# where the app is named `static-app`
|
||||
# and the desired default response is index.html
|
||||
dokku config:set static-app NGINX_ROOT=index.html
|
||||
dokku config:set static-app NGINX_DEFAULT_REQUEST=index.html
|
||||
```
|
||||
|
||||
### Custom nginx config file
|
||||
|
26
bin/compile
26
bin/compile
@ -3,13 +3,13 @@
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
NGINX_VERSION="1.17.0"
|
||||
NGINX_VERSION="1.23.1"
|
||||
NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz"
|
||||
PCRE_VERSION="8.45"
|
||||
PCRE_TARBALL="pcre-${PCRE_VERSION}.tar.gz"
|
||||
SIGIL_VERSION="0.4.0"
|
||||
SIGIL_TARBALL="sigil_${SIGIL_VERSION}_Linux_x86_64.tgz"
|
||||
ZLIB_VERSION="1.2.11"
|
||||
PCRE_VERSION="10.40"
|
||||
PCRE_TARBALL="pcre2-${PCRE_VERSION}.tar.gz"
|
||||
SIGIL_VERSION="0.9.0"
|
||||
SIGIL_TARBALL="gliderlabs-sigil_${SIGIL_VERSION}_linux_amd64.tgz"
|
||||
ZLIB_VERSION="1.2.12"
|
||||
ZLIB_TARBALL="zlib-${ZLIB_VERSION}.tar.gz"
|
||||
|
||||
suppress() {
|
||||
@ -57,7 +57,7 @@ fi
|
||||
|
||||
if [[ ! -d "${PCRE_TARBALL%.tar.gz}" ]]; then
|
||||
echo "-----> Download and unzip pcre ${PCRE_VERSION} via http"
|
||||
curl -sSL "https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
||||
curl -sSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE_VERSION}/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
||||
tar xzf "${PCRE_TARBALL}" && rm -f "${PCRE_TARBALL}"
|
||||
fi
|
||||
|
||||
@ -67,14 +67,18 @@ if [[ ! -d "${ZLIB_TARBALL%.tar.gz}" ]]; then
|
||||
tar xzf "${ZLIB_TARBALL}" && rm -rf "${ZLIB_TARBALL}"
|
||||
fi
|
||||
|
||||
if [[ ! -f "sigil" ]]; then
|
||||
if [[ ! -f "gliderlabs-sigil-amd64" ]]; then
|
||||
echo "-----> Download and unzip sigil ${SIGIL_VERSION} via http"
|
||||
curl -sSL "https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/${SIGIL_TARBALL}" -o "${SIGIL_TARBALL}"
|
||||
curl -sSL "https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/gliderlabs-sigil_${SIGIL_VERSION}_linux_amd64.tgz" -o "${SIGIL_TARBALL}"
|
||||
tar xzf "${SIGIL_TARBALL}" && rm -rf "${SIGIL_TARBALL}"
|
||||
fi
|
||||
|
||||
mkdir -p "$BUILD_DIR/sigil"
|
||||
cp -r sigil "$BUILD_DIR/sigil/"
|
||||
if [[ ! -f "gliderlabs-sigil-amd64" ]]; then
|
||||
echo " ! Missing gliderlabs-sigil-amd64 binary"
|
||||
exit 1
|
||||
fi
|
||||
cp -r gliderlabs-sigil-amd64 "$BUILD_DIR/sigil/sigil"
|
||||
|
||||
cd "nginx-${NGINX_VERSION}"
|
||||
if [[ ! -f "${CACHE_DIR}/bin/nginx" ]]; then
|
||||
@ -83,7 +87,7 @@ if [[ ! -f "${CACHE_DIR}/bin/nginx" ]]; then
|
||||
suppress ./configure \
|
||||
--with-cpu-opt=generic \
|
||||
--prefix="$BUILD_DIR/nginx" \
|
||||
--with-pcre=../pcre-${PCRE_VERSION} \
|
||||
--with-pcre=../pcre2-${PCRE_VERSION} \
|
||||
--sbin-path=. \
|
||||
--pid-path=./nginx.pid \
|
||||
--conf-path=./nginx.conf \
|
||||
|
Reference in New Issue
Block a user