Skip to content

Commit

Permalink
Use REDIS_URL to set up the cache plugin (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa authored May 23, 2024
1 parent adf0b21 commit 94a747f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
# Default: amd64
# Possible values: amd64 or arm64
- ARCH=amd64
- REDIS_URL=redis://redis:6379/0
postgres:
image: postgres:latest
environment:
Expand Down
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ echo "Installing GatewayD plugins..."
"${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

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

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

0 comments on commit 94a747f

Please sign in to comment.