Skip to content

Commit 94a747f

Browse files
authored
Use REDIS_URL to set up the cache plugin (#539)
1 parent adf0b21 commit 94a747f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
# Default: amd64
1919
# Possible values: amd64 or arm64
2020
- ARCH=amd64
21+
- REDIS_URL=redis://redis:6379/0
2122
postgres:
2223
image: postgres:latest
2324
environment:

setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ echo "Installing GatewayD plugins..."
6363
"${GATEWAYD_FILES}"/gatewayd plugin install --skip-path-slip-verification --output-dir "${GATEWAYD_FILES}" --plugin-config "${GATEWAYD_FILES}"/gatewayd_plugins.yaml --cleanup=false --update --overwrite-config || exit 126
6464

6565
# Replace the default Redis URL with the Redis container URL
66-
sed -i 's/redis:\/\/localhost:6379/redis:\/\/redis:6379/' "${GATEWAYD_FILES}"/gatewayd_plugins.yaml
66+
[ -z "${REDIS_URL}" ] && REDIS_URL="redis://redis:6379/0" && export REDIS_URL
67+
echo "Setting Redis URL to ${REDIS_URL}"
68+
sed -i "s#redis://localhost:6379/0#${REDIS_URL}#" "${GATEWAYD_FILES}"/gatewayd_plugins.yaml
6769

6870
echo "GatewayD ${GATEWAYD_VERSION} and plugins installed successfully. Exiting..."

0 commit comments

Comments
 (0)