2017-12-13 13:43:22 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SOURCE_DIR=$(realpath $(dirname "${0}"))/redis
|
|
|
|
# Build Docker container
|
|
|
|
docker build -t redis ${SOURCE_DIR}
|
|
|
|
|
|
|
|
# Configure Redis
|
|
|
|
mkdir -p /srv/redis
|
|
|
|
cp ${SOURCE_DIR}/srv/redis/redis.conf /srv/redis/redis.conf
|
2017-12-13 16:06:31 +01:00
|
|
|
chown -R 6379:6379 /srv/redis
|
2017-12-13 13:43:22 +01:00
|
|
|
|
|
|
|
# Configure Redis service
|
|
|
|
cp ${SOURCE_DIR}/lib/systemd/system/redis.service /lib/systemd/system/redis.service
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable redis
|
|
|
|
systemctl start redis
|