This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
forked from heroku/heroku-buildpack-static
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Airbase/SM-heroku-20-upstream
- Loading branch information
Showing
13 changed files
with
198 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Check Changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check that CHANGELOG is touched | ||
run: | | ||
cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
archives/ | ||
vendor/ | ||
.bundle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,50 @@ | ||
## v3 (3/30/2017) | ||
# Static Buildpack Changelog | ||
|
||
## Unreleased | ||
|
||
|
||
## v7 (2021-03-09) | ||
|
||
* [#202](https://github.com/heroku/heroku-buildpack-static/pull/202) Output a helpful error message when no `static.json` is found | ||
|
||
## v6 (2020-12-09) | ||
|
||
* [#190](https://github.com/heroku/heroku-buildpack-static/pull/190) Update nginx for Heroku-16 and Heroku-18 to 1.19.0 | ||
* [#186](https://github.com/heroku/heroku-buildpack-static/pull/186) Ensure the SSL module is enabled | ||
|
||
## v5 (2020-11-11) | ||
|
||
* [#182](https://github.com/heroku/heroku-buildpack-static/pull/182) Add support for Heroku-20 | ||
* [#181](https://github.com/heroku/heroku-buildpack-static/pull/181) Fix compatibility with ngx_mruby 1.18.4+ | ||
* [#178](https://github.com/heroku/heroku-buildpack-static/pull/178) Exclude unnecessary files when publishing the buildpack | ||
* [#177](https://github.com/heroku/heroku-buildpack-static/pull/177) Make curl retry in case of a failed download | ||
* [#177](https://github.com/heroku/heroku-buildpack-static/pull/177) Fix the printing of the installed nginx version | ||
* [#177](https://github.com/heroku/heroku-buildpack-static/pull/177) Switch to the recommended S3 URL format | ||
* [#177](https://github.com/heroku/heroku-buildpack-static/pull/177) Remove unused archive caching | ||
* [#177](https://github.com/heroku/heroku-buildpack-static/pull/177) Fail the build early on unsupported stacks | ||
|
||
## v4 (2019-09-18) | ||
|
||
* [#136](https://github.com/heroku/heroku-buildpack-static/pull/136) Add support for canonical host | ||
* [#45](https://github.com/heroku/heroku-buildpack-static/pull/45) Add Basic Auth Configuration | ||
* [#78](https://github.com/heroku/heroku-buildpack-static/pull/78) Add json mime type | ||
* [#70](https://github.com/heroku/heroku-buildpack-static/pull/70) Make config copying idempotent | ||
* [#68](https://github.com/heroku/heroku-buildpack-static/pull/68) Disable access logs | ||
|
||
## v3 (2017-03-30) | ||
|
||
* [#32](https://github.com/heroku/heroku-buildpack-static/pull/32) proxies set ssl server name extension for SNI | ||
* [#37](https://github.com/heroku/heroku-buildpack-static/pull/47) fallback proxies set ssl server name extension for SNI | ||
* [#61](https://github.com/heroku/heroku-buildpack-static/pull/61) proxy redirects work even when the scheme does not match | ||
* [#62](https://github.com/heroku/heroku-buildpack-static/pull/62) clean urls work even on a directory | ||
* [#63](https://github.com/heroku/heroku-buildpack-static/pull/63) proxies respect DNS TTL | ||
* [#65](https://github.com/heroku/heroku-buildpack-static/pull/65) https redirects happen over proxies | ||
|
||
## v2 (7/13/2016) | ||
## v2 (2016-07-13) | ||
|
||
* [#36](https://github.com/heroku/heroku-buildpack-static/pull/36) env interpolation available when doing `redirects` | ||
* [#40](https://github.com/heroku/heroku-buildpack-static/pull/40) mitigate CRLF HTTP Header Injection when using `https_only` | ||
|
||
## v1 (3/27/2016) | ||
## v1 (2016-03-27) | ||
|
||
* Initial Release! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Heroku | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
S3_BUCKET ?= heroku-buildpack-static | ||
|
||
.PHONY: build build-heroku-16 build-heroku-18 build-heroku-20 sync | ||
|
||
build: build-heroku-16 build-heroku-18 build-heroku-20 | ||
|
||
build-heroku-16: | ||
@docker pull heroku/heroku:16-build | ||
@docker run -v "$(shell pwd)":/buildpack --rm -it -e "STACK=heroku-16" heroku/heroku:16-build /buildpack/scripts/build_ngx_mruby.sh | ||
|
||
build-heroku-18: | ||
@docker pull heroku/heroku:18-build | ||
@docker run -v "$(shell pwd)":/buildpack --rm -it -e "STACK=heroku-18" heroku/heroku:18-build /buildpack/scripts/build_ngx_mruby.sh | ||
|
||
build-heroku-20: | ||
@docker pull heroku/heroku:20-build | ||
@docker run -v "$(shell pwd)":/buildpack --rm -it -e "STACK=heroku-20" heroku/heroku:20-build /buildpack/scripts/build_ngx_mruby.sh | ||
|
||
sync: | ||
@echo "Performing dry run of sync to $(S3_BUCKET)..." | ||
@echo | ||
@aws s3 sync archives/ s3://$(S3_BUCKET) --dryrun | ||
@echo | ||
@read -p "Continue with sync? [y/N]? " answer && [ "$$answer" = "y" ] | ||
@echo | ||
@aws s3 sync archives/ s3://$(S3_BUCKET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[buildpack] | ||
name = "Static HTML" | ||
|
||
[publish.Ignore] | ||
files = [ | ||
".github/", | ||
"spec/", | ||
".gitignore", | ||
".rspec", | ||
"circle.yml", | ||
"Gemfile", | ||
"Gemfile.lock", | ||
"Makefile", | ||
"Rakefile" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
NGX_MRUBY_VERSION='2.2.3' | ||
NGX_MRUBY_URL="https://github.com/matsumotory/ngx_mruby/archive/v${NGX_MRUBY_VERSION}.tar.gz" | ||
|
||
echo "Building ngx_mruby v${NGX_MRUBY_VERSION} for ${STACK}" | ||
|
||
BUILD_DIR=$(mktemp -d /tmp/ngx_mruby.XXXX) | ||
SCRIPTS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
OUTPUT_DIR="$(dirname "${SCRIPTS_DIR}")/archives/${STACK}" | ||
|
||
mkdir -p "${OUTPUT_DIR}" | ||
cd "${BUILD_DIR}" | ||
|
||
echo "Downloading ngx_mruby from ${NGX_MRUBY_URL}" | ||
curl -sSfL "${NGX_MRUBY_URL}" | tar -xz --strip-components 1 | ||
|
||
# Taken from the defaults: | ||
# https://github.com/matsumotory/ngx_mruby/blob/v2.2.3/build.sh#L23-L40 | ||
BUILD_OPTS="--prefix=${PWD}/build/nginx" | ||
BUILD_OPTS+=' --with-http_stub_status_module --with-stream --without-stream_access_module --with-cc-opt=-fno-common' | ||
# Our custom addition, to enable the SSL module. | ||
BUILD_OPTS+=' --with-http_ssl_module' | ||
|
||
NGINX_CONFIG_OPT_ENV="${BUILD_OPTS}" ./build.sh | ||
make install | ||
|
||
echo 'nginx build complete!' | ||
|
||
NGINX_BIN_DIR="${BUILD_DIR}/build/nginx/sbin" | ||
cd "${NGINX_BIN_DIR}" | ||
|
||
# Check that nginx can start | ||
./nginx -V | ||
|
||
# Check that OpenSSL support was enabled | ||
./nginx -V |& grep 'built with OpenSSL' || { echo 'Missing OpenSSL support!'; exit 1; } | ||
|
||
NGINX_VERSION=$(./nginx -v |& cut -d '/' -f 2-) | ||
ARCHIVE_PATH="${OUTPUT_DIR}/nginx-${NGINX_VERSION}-ngx_mruby-${NGX_MRUBY_VERSION}.tgz" | ||
|
||
tar -czf "${ARCHIVE_PATH}" nginx | ||
|
||
echo "Archive saved to: ${ARCHIVE_PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters