From: Dan Ungureanu Date: Fri, 15 Feb 2019 13:41:24 +0000 (+0200) Subject: Remove Redis service from base. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c29734058ba46a87ebb532550911c56f2d14b8f9;p=discourse_docker.git Remove Redis service from base. --- diff --git a/image/base/Dockerfile b/image/base/Dockerfile index 76c4569..8e04bda 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -131,7 +131,6 @@ ADD boot /sbin/boot ADD cron /etc/service/cron/run ADD rsyslog /etc/service/rsyslog/run ADD cron.d_anacron /etc/cron.d/anacron -ADD redis /etc/service/redis/run # Discourse specific bits RUN useradd discourse -s /bin/bash -m -U &&\ diff --git a/image/base/redis b/image/base/redis deleted file mode 100755 index bfadf8c..0000000 --- a/image/base/redis +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -e - -RUNDIR=/var/run/redis -PIDFILE=/var/run/redis/redis-server.pid - -mkdir -p $RUNDIR -touch $PIDFILE -chown -R redis:redis $RUNDIR -chmod 755 $RUNDIR - -exec chpst -u redis /usr/bin/redis-server /etc/redis/redis.conf diff --git a/templates/redis.template.yml b/templates/redis.template.yml index c69a736..084a489 100644 --- a/templates/redis.template.yml +++ b/templates/redis.template.yml @@ -5,6 +5,15 @@ run: contents: | #!/bin/sh exec 2>&1 + + RUNDIR=/var/run/redis + PIDFILE=/var/run/redis/redis-server.pid + + mkdir -p $RUNDIR + touch $PIDFILE + chown -R redis:redis $RUNDIR + chmod 755 $RUNDIR + exec thpoff chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf - file: path: /etc/service/redis/log/run