start
This commit is contained in:
28
commands/02-start-redis.sh
Executable file
28
commands/02-start-redis.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#! /bin/bash
|
||||
source .env
|
||||
|
||||
redis_path=${APPS_VOLUME}/redis
|
||||
|
||||
for p in "${redis_path}"; do
|
||||
if ! ls ${p} >/dev/null 2>&1; then
|
||||
echo "Creating ${p} directory..."
|
||||
mkdir -p ${p}
|
||||
else
|
||||
echo "directory exists ${p}"
|
||||
fi
|
||||
done
|
||||
|
||||
podman run -d --replace \
|
||||
--name redis \
|
||||
--hostname redis \
|
||||
--network container-bridge \
|
||||
--tz=local \
|
||||
-v ${redis_path}:/data \
|
||||
--health-cmd="redis-cli ping" \
|
||||
--health-interval=10s \
|
||||
--health-timeout=5s \
|
||||
--health-retries=5 \
|
||||
docker.io/redis:6 \
|
||||
--databases 1
|
||||
|
||||
podman generate systemd --new --files --name redis
|
||||
Reference in New Issue
Block a user