29 lines
546 B
Bash
Executable File
29 lines
546 B
Bash
Executable File
#! /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
|