Skip to content

Commit

Permalink
#2585 Fixed the redis prefix key not being set in Echo server - causi…
Browse files Browse the repository at this point in the history
…ng the route synchronization not to work anymore.
  • Loading branch information
Wotuu committed Nov 8, 2024
1 parent b2b1b1d commit ec94115
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6380
REDIS_DB=0
REDIS_PREFIX=keystoneguru-local-cache:

MODEL_CACHE_ENABLED=false
MODEL_CACHE_STORE=redis_model_cache
Expand Down
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DB=0
REDIS_PREFIX=keystoneguru-local-cache:

MODEL_CACHE_ENABLED=true
MODEL_CACHE_STORE=redis_model_cache
Expand Down
6 changes: 3 additions & 3 deletions docker-compose/laravel-echo-server/bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ if [[ "$1" == 'start' ]] || [[ "$1" == 'client:add' ]] || [[ "$1" == 'client:rem
sed -i "s|LARAVEL_ECHO_SERVER_CLIENT_KEY|${LARAVEL_ECHO_SERVER_CLIENT_KEY}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|LARAVEL_ECHO_SERVER_DB|${LARAVEL_ECHO_SERVER_DB:-redis}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_HOST|${REDIS_HOST:-redis}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_PORT|${REDIS_PORT:-6379}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_PORT|${REDIS_PORT:-6380}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_PASSWORD|${REDIS_PASSWORD}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_PREFIX|${REDIS_PREFIX-laravel_database_}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_PREFIX|${REDIS_PREFIX}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
sed -i "s|REDIS_DB|${REDIS_DB:-0}|i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
# Remove password config if it is empty
sed -i "s|\"password\": \"\",||i" /app/docker-compose/laravel-echo-server/laravel-echo-server.json
Expand All @@ -56,4 +56,4 @@ fi

echo "$@" "--config /app/docker-compose/laravel-echo-server/laravel-echo-server.json"

laravel-echo-server start --config /app/docker-compose/laravel-echo-server/laravel-echo-server.json
laravel-echo-server start --config /app/docker-compose/laravel-echo-server/laravel-echo-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"database": "redis",
"databaseConfig": {
"redis": {
"port": 6380,
"host": "redis",
"db": 0
"port": "REDIS_PORT",
"host": "REDIS_HOST",
"db": "REDIS_HOST_DB",
"keyPrefix": "REDIS_PREFIX"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
Expand Down
3 changes: 2 additions & 1 deletion laravel-echo-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ EchoServer.run({
"redis": {
"host": env.REDIS_HOST,
"port": env.REDIS_PORT,
"db": env.REDIS_DB
"db": env.REDIS_DB,
"keyPrefix": env.REDIS_PREFIX
},
"publishPresence": true
},
Expand Down

0 comments on commit ec94115

Please sign in to comment.