mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2025-06-26 10:30:46 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
9eae441352 | |||
b0ce745a1b | |||
fe3a5dc54f | |||
ad8d7c4261 | |||
e8e0807a2d | |||
673fd38bb2 | |||
1945cf3645 | |||
a9b3cb1767 | |||
c6b3e74808 | |||
ffaa249c5c | |||
e31fee35bb | |||
0b290ce1f6 | |||
ec0560066c | |||
f873fe2024 | |||
9a82e569c1 | |||
6ecc56df72 | |||
ed184f98fd | |||
2535bd6ebb | |||
6d1ae20708 | |||
dded3b0717 | |||
d4f93ae2b3 | |||
51f642dcff | |||
0a46959ef7 |
@ -8,10 +8,9 @@ All static files that you want to serve should be in the root directory of your
|
||||
|
||||
### Dokku
|
||||
|
||||
To trigger detection of this buildpack in Dokku, you have two options:
|
||||
To trigger detection of this buildpack you need to add a dotfile:
|
||||
|
||||
- Automatic: Add an *empty* file called `.static` to your root directory of your web project.
|
||||
- Manual: Set your `BUILDPACK_URL` via `dokku config:set BUILDPACK_URL=https://github.com/dokku/buildpack-nginx.git`
|
||||
Add an *empty* file called `.static` to your root directory of your web project (regardless if you use a custom value for NGINX_ROOT)
|
||||
|
||||
### Heroku
|
||||
|
||||
|
18
bin/compile
18
bin/compile
@ -2,13 +2,13 @@
|
||||
# bin/compile <build-dir> <cache-dir>
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
NGINX_VERSION="1.10.1"
|
||||
NGINX_VERSION="1.17.0"
|
||||
NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz"
|
||||
PCRE_VERSION="8.39"
|
||||
PCRE_VERSION="8.43"
|
||||
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.8"
|
||||
ZLIB_VERSION="1.2.11"
|
||||
ZLIB_TARBALL="zlib-${ZLIB_VERSION}.tar.gz"
|
||||
|
||||
suppress() {
|
||||
@ -47,25 +47,25 @@ fi
|
||||
cd "$CACHE_DIR"
|
||||
|
||||
if [[ ! -d "${NGINX_TARBALL%.tar.gz}" ]]; then
|
||||
echo "-----> Download and unzip nginx"
|
||||
echo "-----> Download and unzip nginx ${NGINX_VERSION} via http"
|
||||
curl -sSL "http://nginx.org/download/${NGINX_TARBALL}" -o "${NGINX_TARBALL}"
|
||||
tar xzf "${NGINX_TARBALL}" && rm -f "${NGINX_TARBALL}"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${PCRE_TARBALL%.tar.gz}" ]]; then
|
||||
echo "-----> Download and unzip pcre"
|
||||
curl -sSL "http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
||||
echo "-----> Download and unzip pcre ${PCRE_VERSION} via ftp"
|
||||
curl -sSL "https://ftp.pcre.org/pub/pcre/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
||||
tar xzf "${PCRE_TARBALL}" && rm -f "${PCRE_TARBALL}"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${ZLIB_TARBALL%.tar.gz}" ]]; then
|
||||
echo "-----> Download and unzip zlib"
|
||||
curl -sSL "http://zlib.net/${ZLIB_TARBALL}" -o "${ZLIB_TARBALL}"
|
||||
echo "-----> Download and unzip zlib ${ZLIB_VERSION} via http"
|
||||
curl -sSL "https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz" -o "${ZLIB_TARBALL}"
|
||||
tar xzf "${ZLIB_TARBALL}" && rm -rf "${ZLIB_TARBALL}"
|
||||
fi
|
||||
|
||||
if [[ ! -f "sigil" ]]; then
|
||||
echo "-----> Download and unzip sigil"
|
||||
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}"
|
||||
tar xzf "${SIGIL_TARBALL}" && rm -rf "${SIGIL_TARBALL}"
|
||||
fi
|
||||
|
@ -19,6 +19,7 @@ http {
|
||||
root /app/www;
|
||||
{{ end }}
|
||||
index index.html;
|
||||
port_in_redirect off;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
@ -14,6 +14,7 @@ types {
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
text/vtt vtt;
|
||||
|
||||
image/png png;
|
||||
image/tiff tif tiff;
|
||||
|
Reference in New Issue
Block a user