Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 53b03b0

Browse files
authored
Directions for custom nginx builds (#63)
Update readme.md and comments in scripts/build_nginx
1 parent 952f68c commit 53b03b0

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.5.1] - 2020-08-22
8+
### Changes
9+
- [readme.md] Updated custom build instructions
10+
- [scripts/build_nginx] Updated outdated comments
11+
712
## [1.5] - 2020-07-20
813
### Added
914
- [all] move to tgz to distribute binaries

readme.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,25 @@ You can provide your own NGINX config by creating a file named `nginx.conf.erb`
110110

111111
### Customizable NGINX Compile Options
112112

113-
See [scripts/build_nginx](scripts/build_nginx) for the build steps. Configuring is as easy as changing the "./configure" options.
113+
This requires a clone of this repository and [Docker](https://www.docker.com/). All you need to do is have Docker setup and running on your machine. The [`Makefile`](Makefile) will take care of the rest.
114114

115-
You can run the builds in a [Docker](https://www.docker.com/) container:
115+
Configuring is as easy as changing the options passed to `./configure` in [scripts/build_nginx](scripts/build_nginx).
116+
117+
Run the builds in a container via:
118+
119+
```
120+
$ make build
121+
```
122+
123+
The binaries will be packed into `tar` files and placed in the repository's root directory. Commit the changes and push your repository.
124+
125+
Finally update your app to use your custom buildpack on Heroku either at https://dashboard.heroku.com/apps/#{YOUR_APP_NAME}/settings or via the Heroku CLI via:
116126

117127
```
118-
$ make build # It outputs the latest builds to bin/cedar-*
128+
heroku buildpacks:set #{YOUR_GIT_REPO_CLONE}
119129
```
120130

121-
To test the builds:
131+
To test the builds locally:
122132

123133
```
124134
$ make shell

scripts/build_nginx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
#!/bin/bash
2-
# Build NGINX and modules on Heroku.
3-
# This program is designed to run in a web dyno provided by Heroku.
4-
# We would like to build an NGINX binary for the builpack on the
5-
# exact machine in which the binary will run.
6-
# Our motivation for running in a web dyno is that we need a way to
7-
# download the binary once it is built so we can vendor it in the buildpack.
8-
#
9-
# Once the dyno has is 'up' you can open your browser and navigate
10-
# this dyno's directory structure to download the nginx binary.
2+
# Build NGINX and modules for Heroku.
3+
# This script is designed to run in a Heroku Stack Docker
4+
# image. More information on the Heroku Stack can be found
5+
# at https://devcenter.heroku.com/articles/stack
116

127
NGINX_VERSION=${NGINX_VERSION-1.18.0}
138
PCRE_VERSION=${PCRE_VERSION-8.44}
@@ -41,6 +36,7 @@ echo "Downloading $zlib_url"
4136
echo "Downloading $uuid4_url"
4237
(cd nginx-${NGINX_VERSION} && curl -L $uuid4_url | tar xvz )
4338

39+
# This will build `nginx`
4440
(
4541
cd nginx-${NGINX_VERSION}
4642
./configure \
@@ -55,6 +51,7 @@ echo "Downloading $uuid4_url"
5551
make install
5652
)
5753

54+
# This will build `nginx-debug`
5855
(
5956
cd nginx-${NGINX_VERSION}
6057
./configure \

0 commit comments

Comments
 (0)