Remove Redis service from base.
authorDan Ungureanu <dan@ungureanu.me>
Fri, 15 Feb 2019 13:41:24 +0000 (15:41 +0200)
committerDan Ungureanu <dan@ungureanu.me>
Fri, 15 Feb 2019 13:41:24 +0000 (15:41 +0200)
image/base/Dockerfile
image/base/redis [deleted file]
templates/redis.template.yml

index 76c4569ad3b7a9a93bb83f088ea3494a884b2cb4..8e04bda540ec675ae32539e489df09bbebe4e1ca 100644 (file)
@@ -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 (executable)
index bfadf8c..0000000
+++ /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
index c69a7360d02594cd01b128d469a92abe80d6239e..084a489fcaf4c79c20fb543b0654ccf7bd4713e6 100644 (file)
@@ -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