Admin dashboard and sessions
This commit is contained in:
18
scripts/init_redis.sh
Executable file
18
scripts/init_redis.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -eo pipefail
|
||||
|
||||
RUNNING_CONTAINER=$(docker ps --filter 'name=redis' --format '{{.ID}}')
|
||||
if [[ -n $RUNNING_CONTAINER ]]; then
|
||||
echo >&2 "A redis container is already running (${RUNNING_CONTAINER})."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker run \
|
||||
-p "6379:6379" \
|
||||
-d \
|
||||
--name "redis_$(date '+%s')" \
|
||||
redis
|
||||
|
||||
>&2 echo "Redis is ready to go!"
|
||||
Reference in New Issue
Block a user