Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: update for heroku-24 #47

Merged
merged 8 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- heroku-22
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: bash support/test.sh ${{ matrix.stack }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM $BUILD_IMAGE AS builder
ARG STACK

# Emulate the platform where root access is not available
USER root
RUN useradd -d /app non-root-user
RUN mkdir -p /app /cache /env
RUN chown non-root-user /app /cache /env
Expand All @@ -20,6 +21,7 @@ RUN env -i PATH=$PATH HOME=$HOME STACK=$STACK /buildpack/bin/compile /app /cache


FROM $RUNTIME_IMAGE
USER root
RUN useradd -d /app non-root-user
USER non-root-user
COPY --from=builder --chown=non-root-user /app /app
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) th
allows an application to use an [stunnel](http://stunnel.org) to connect securely to
Heroku Redis. It is meant to be used in conjunction with other buildpacks.

**This buildpack is only for use with Heroku Redis 4 and 5. For Heroku Redis 6 and newer, use its built-in TLS support instead.**
> [!WARNING]
> This buildpack isn’t compatible with [`heroku-24`](article link?) and later. You don’t need this buildpack for Redis 6+, which supports native TLS.
brahyt-sf marked this conversation as resolved.
Show resolved Hide resolved

**For more information, see [Securing Heroku Redis](https://devcenter.heroku.com/articles/securing-heroku-redis).**
> For more information, see [Securing Heroku Redis](https://devcenter.heroku.com/articles/heroku-redis#security-and-compliance).

## Usage

Expand Down
10 changes: 10 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ unset GIT_DIR
BUILD_DIR=$1
BUILDPACK_DIR="$(dirname $(dirname $0))"

if ! command -v stunnel4 > /dev/null; then

echo "! This buildpack uses stunnel, which isn’t supported on heroku-24 and later."
echo "! You don’t need this buildpack for Redis 6+. Remove it with the command:"
echo "! $ heroku buildpacks:remove heroku/redis"
echo "! To use Redis’ native TLS support, see https://devcenter.heroku.com/articles/heroku-redis#security-and-compliance."
brahyt-sf marked this conversation as resolved.
Show resolved Hide resolved

exit 1
fi

echo "-----> Moving the configuration generation script into app/bin"
mkdir -p $BUILD_DIR/bin
cp "$BUILDPACK_DIR/bin/stunnel-conf.sh" $BUILD_DIR/bin/stunnel-conf.sh
Expand Down