fix: .env file missing REDIS_URL

This commit is contained in:
icyleaf
2024-04-11 12:35:17 +08:00
parent 1894cbbca3
commit 2d2ef0e11c
+1 -1
View File
@@ -7,7 +7,7 @@ else
cp -n "${EXAMPLE_ENV_FILE}" "${ENV_FILE}"
fi
if [ "${REDIS_ENABLED_LEGACY:-0}" == 1 && grep 'REDIS_URL=' $ENV_FILE ]; then
if [ "${REDIS_ENABLED_LEGACY:-0}" == 1 ] && ! grep -q "REDIS_URL" $ENV_FILE; then
echo "" >> $ENV_FILE
echo "# The full Redis URL for the Redis cache." >> $ENV_FILE
echo "REDIS_URL=redis://redis:6379/0" >> $ENV_FILE