-
Notifications
You must be signed in to change notification settings - Fork 191
Upgrade HAProxy image tag to lts-alpine #149
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7035de2
Disable poetry package mode
niklasteichmann 3622fe8
Upgrade HAProxy image tag
niklasteichmann b6cac7b
Upgrade job image to ubuntu-latest
niklasteichmann ebca21e
Upgrade version of actions/cache to v4
niklasteichmann c6e73c0
Pinned job image version to ubuntu-24.04
niklasteichmann a1f3a9e
Refactored docker-entrypoint.sh to add docker group
niklasteichmann 593f180
Fixed typo in ubuntu image version
niklasteichmann c1558e5
Merge branch 'master' into master
niklasteichmann a6b2b52
fix formatting
niklasteichmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,33 +1,9 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # Normalize the input for DISABLE_IPV6 to lowercase | ||
| DISABLE_IPV6_LOWER=$(echo "$DISABLE_IPV6" | tr '[:upper:]' '[:lower:]') | ||
| # add haproxy user to group of docker socket | ||
| DOCKER_GROUP=$(stat -c %G "$SOCKET_PATH") | ||
| adduser haproxy "$DOCKER_GROUP" | ||
|
|
||
| # Check for different representations of 'true' and set BIND_CONFIG | ||
| case "$DISABLE_IPV6_LOWER" in | ||
| 1|true|yes) | ||
| BIND_CONFIG=":2375" | ||
| ;; | ||
| *) | ||
| BIND_CONFIG="[::]:2375 v4v6" | ||
| ;; | ||
| esac | ||
|
|
||
| # Process the HAProxy configuration template using sed | ||
| sed "s/\${BIND_CONFIG}/$BIND_CONFIG/g" /usr/local/etc/haproxy/haproxy.cfg.template > /usr/local/etc/haproxy/haproxy.cfg | ||
|
|
||
| # first arg is `-f` or `--some-option` | ||
| if [ "${1#-}" != "$1" ]; then | ||
| set -- haproxy "$@" | ||
| fi | ||
|
|
||
| if [ "$1" = 'haproxy' ]; then | ||
| shift # "haproxy" | ||
| # if the user wants "haproxy", let's add a couple useful flags | ||
| # -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2") | ||
| # -db -- disables background mode | ||
| set -- haproxy -W -db "$@" | ||
| fi | ||
|
|
||
| exec "$@" | ||
| # continue as haproxy user, preserving entrypoint parameters | ||
| su -s /bin/sh -c 'start-haproxy.sh "$@"' haproxy -- "$@" |
This file contains hidden or 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 hidden or 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 hidden or 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,33 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # Normalize the input for DISABLE_IPV6 to lowercase | ||
| DISABLE_IPV6_LOWER=$(echo "$DISABLE_IPV6" | tr '[:upper:]' '[:lower:]') | ||
|
|
||
| # Check for different representations of 'true' and set BIND_PORT and BIND_OPTIONS accordingly | ||
| case "$DISABLE_IPV6_LOWER" in | ||
| 1|true|yes) | ||
| export BIND_PORT=':2375' | ||
| export BIND_OPTIONS='' | ||
| ;; | ||
| *) | ||
| export BIND_PORT=':::2375' | ||
| export BIND_OPTIONS='v4v6' | ||
| ;; | ||
| esac | ||
|
|
||
| # first arg is `-f` or `--some-option` | ||
| if [ "${1#-}" != "$1" ]; then | ||
| set -- haproxy "$@" | ||
| fi | ||
|
|
||
| if [ "$1" = 'haproxy' ]; then | ||
| shift # "haproxy" | ||
| # if the user wants "haproxy", let's add a couple useful flags | ||
| # -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2") | ||
| # -db -- disables background mode | ||
| set -- haproxy -W -db "$@" | ||
| fi | ||
|
|
||
| exec "$@" | ||
|
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it possible to disable ipv6 via env I had to make this change in the HAProxy config. It works, but leads to warnings on start.
If someone knows a better way to do this, let me know.