From c29734058ba46a87ebb532550911c56f2d14b8f9 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Fri, 15 Feb 2019 15:41:24 +0200 Subject: [PATCH] Remove Redis service from base. --- image/base/Dockerfile | 1 - image/base/redis | 12 ------------ templates/redis.template.yml | 9 +++++++++ 3 files changed, 9 insertions(+), 13 deletions(-) delete mode 100755 image/base/redis 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 -- 2.25.1