Skip to content

Commit 49820d1

Browse files
author
Colin Fitz-Maurice
authored
add redis-cli command (#140)
1 parent 67f8be3 commit 49820d1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

bin/sail

+13-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ if [ $# -gt 0 ]; then
238238
else
239239
sail_is_not_running
240240
fi
241-
241+
242242
# Initiate a PostgreSQL CLI terminal session within the "pgsql" container...
243243
elif [ "$1" == "psql" ]; then
244244
shift 1
@@ -276,6 +276,18 @@ if [ $# -gt 0 ]; then
276276
sail_is_not_running
277277
fi
278278

279+
# Initiate a Redis CLI terminal session within the "redis" container...
280+
elif [ "$1" == "redis" ] ; then
281+
shift 1
282+
283+
if [ "$EXEC" == "yes" ]; then
284+
docker-compose exec \
285+
redis \
286+
redis-cli
287+
else
288+
sail_is_not_running
289+
fi
290+
279291
# Share the site...
280292
elif [ "$1" == "share" ]; then
281293
shift 1

0 commit comments

Comments
 (0)