Skip to content

Commit

Permalink
fix: tls-port can not use 6379 which be used by redis port (#70)
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer authored Feb 1, 2024
1 parent 0b2efdc commit 5f7751f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ redis_mode_setup() {
tls_setup() {
if [[ "${TLS_MODE}" == "true" ]]; then
{
echo port 0
echo tls-port 6379
echo tls-cert-file "${REDIS_TLS_CERT}"
echo tls-key-file "${REDIS_TLS_CERT_KEY}"
echo tls-ca-cert-file "${REDIS_TLS_CA_KEY}"
Expand Down Expand Up @@ -100,9 +98,16 @@ persistence_setup() {
}

port_setup() {
{
echo port "${REDIS_PORT}"
} >> /etc/redis/redis.conf
if [[ "${TLS_MODE}" == "true" ]]; then
{
echo port 0
echo tls-port "${REDIS_PORT}"
} >> /etc/redis/redis.conf
else
{
echo port "${REDIS_PORT}"
} >> /etc/redis/redis.conf
fi

if [[ "${NODEPORT}" == "true" ]]; then
CLUSTER_ANNOUNCE_PORT_VAR="announce_port_$(hostname | tr '-' '_')"
Expand Down

0 comments on commit 5f7751f

Please sign in to comment.