Skip to content

Commit 6aeec03

Browse files
committed
add docker-entrypoint.sh
1 parent c09547f commit 6aeec03

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docker-entrypoint.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# first arg is `-f` or `--some-option`
5+
if [ "${1#-}" != "$1" ]; then
6+
set -- haproxy "$@"
7+
fi
8+
9+
if [ "$1" = 'haproxy' ]; then
10+
shift # "haproxy"
11+
# if the user wants "haproxy", let's add a couple useful flags
12+
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
13+
# -db -- disables background mode
14+
set -- haproxy -W -db "$@"
15+
fi
16+
17+
exec "$@"

0 commit comments

Comments
 (0)