mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2025-06-26 18:40:45 +00:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
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
|
### 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.
|
Add an *empty* file called `.static` to your root directory of your web project (regardless if you use a custom value for NGINX_ROOT)
|
||||||
- Manual: Set your `BUILDPACK_URL` via `dokku config:set BUILDPACK_URL=https://github.com/dokku/buildpack-nginx.git`
|
|
||||||
|
|
||||||
### Heroku
|
### Heroku
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@ set -eo pipefail; [[ $TRACE ]] && set -x
|
|||||||
|
|
||||||
NGINX_VERSION="1.10.1"
|
NGINX_VERSION="1.10.1"
|
||||||
NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz"
|
NGINX_TARBALL="nginx-${NGINX_VERSION}.tar.gz"
|
||||||
PCRE_VERSION="8.39"
|
PCRE_VERSION="8.40"
|
||||||
PCRE_TARBALL="pcre-${PCRE_VERSION}.tar.gz"
|
PCRE_TARBALL="pcre-${PCRE_VERSION}.tar.gz"
|
||||||
SIGIL_VERSION="0.4.0"
|
SIGIL_VERSION="0.4.0"
|
||||||
SIGIL_TARBALL="sigil_${SIGIL_VERSION}_Linux_x86_64.tgz"
|
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"
|
ZLIB_TARBALL="zlib-${ZLIB_VERSION}.tar.gz"
|
||||||
|
|
||||||
suppress() {
|
suppress() {
|
||||||
@ -54,13 +54,13 @@ fi
|
|||||||
|
|
||||||
if [[ ! -d "${PCRE_TARBALL%.tar.gz}" ]]; then
|
if [[ ! -d "${PCRE_TARBALL%.tar.gz}" ]]; then
|
||||||
echo "-----> Download and unzip pcre"
|
echo "-----> Download and unzip pcre"
|
||||||
curl -sSL "http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
curl -sSL "https://ftp.pcre.org/pub/pcre/${PCRE_TARBALL}" -o "${PCRE_TARBALL}"
|
||||||
tar xzf "${PCRE_TARBALL}" && rm -f "${PCRE_TARBALL}"
|
tar xzf "${PCRE_TARBALL}" && rm -f "${PCRE_TARBALL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "${ZLIB_TARBALL%.tar.gz}" ]]; then
|
if [[ ! -d "${ZLIB_TARBALL%.tar.gz}" ]]; then
|
||||||
echo "-----> Download and unzip zlib"
|
echo "-----> Download and unzip zlib"
|
||||||
curl -sSL "http://zlib.net/${ZLIB_TARBALL}" -o "${ZLIB_TARBALL}"
|
curl -sSL "https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz" -o "${ZLIB_TARBALL}"
|
||||||
tar xzf "${ZLIB_TARBALL}" && rm -rf "${ZLIB_TARBALL}"
|
tar xzf "${ZLIB_TARBALL}" && rm -rf "${ZLIB_TARBALL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ http {
|
|||||||
root /app/www;
|
root /app/www;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
index index.html;
|
index index.html;
|
||||||
|
port_in_redirect off;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
Reference in New Issue
Block a user