diff --git a/Dockerfile b/Dockerfile index 1abbc7b..fbd211b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.4 MAINTAINER Christian Lück -RUN apk add --update nginx supervisor php5-fpm php5-cli php5-curl php5-gd php5-json php5-dom php5-pcntl php5-posix \ +RUN apk add --update nginx s6 php5-fpm php5-cli php5-curl php5-gd php5-json php5-dom php5-pcntl php5-posix \ php5-pgsql php5-mysql php5-mcrypt php5-pdo php5-pdo_pgsql php5-pdo_mysql ca-certificates && \ rm -rf /var/cache/apk/* @@ -30,5 +30,5 @@ ENV DB_PASS ttrss # always re-configure database with current ENV when RUNning container, then monitor all services ADD configure-db.php /configure-db.php -ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf -CMD php /configure-db.php && supervisord -c /etc/supervisor/conf.d/supervisord.conf +ADD s6/ /etc/s6/ +CMD php /configure-db.php && s6-svscan /etc/s6/ diff --git a/s6/nginx/run b/s6/nginx/run new file mode 100755 index 0000000..14cd019 --- /dev/null +++ b/s6/nginx/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /usr/sbin/nginx diff --git a/s6/php-fpm/run b/s6/php-fpm/run new file mode 100755 index 0000000..d39afbd --- /dev/null +++ b/s6/php-fpm/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /usr/bin/php-fpm --nodaemonize diff --git a/s6/update-daemon/run b/s6/update-daemon/run new file mode 100755 index 0000000..c85e038 --- /dev/null +++ b/s6/update-daemon/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec s6-setuidgid nobody /usr/bin/php /var/www/update_daemon2.php diff --git a/supervisord.conf b/supervisord.conf deleted file mode 100644 index 2d8d7db..0000000 --- a/supervisord.conf +++ /dev/null @@ -1,15 +0,0 @@ -[supervisord] -nodaemon=true - -[program:php-fpm] -command=/usr/bin/php-fpm --nodaemonize - -[program:nginx] -command=/usr/sbin/nginx - -[program:ttrss-update-daemon] -command=/usr/bin/php /var/www/update_daemon2.php -user=nobody -stdout_logfile=/tmp/%(program_name)s.stdout -stderr_logfile=/tmp/%(program_name)s.stderr -