diff --git a/Dockerfile b/Dockerfile index a832ae3..425c44d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN \ php7-mbstring \ php7-json \ php7-fileinfo \ + php7-pcntl \ git \ tar @@ -39,7 +40,6 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf COPY php-fpm.conf /etc/php7/php-fpm.d/ttrss.conf COPY install-db.php /var/lib/tt-rss-install/install-db.php COPY supervisor.conf /var/lib/tt-rss-install/supervisor.conf -COPY manage-supervisord.py /var/lib/tt-rss-install/manage-supervisord.py COPY config.php /var/lib/tt-rss/config.php RUN \ diff --git a/manage-supervisord.py b/manage-supervisord.py deleted file mode 100644 index 1cc953b..0000000 --- a/manage-supervisord.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python -import sys -import os -import signal - -def write_stdout(s): - sys.stdout.write(s) - sys.stdout.flush() - -def write_stderr(s): - sys.stderr.write(s) - sys.stderr.flush() - -def main(): - while 1: - write_stdout('READY\n') - line = sys.stdin.readline() - os.kill(1, signal.SIGTERM) - write_stdout('RESULT 2\nOK') - -if __name__ == '__main__': - main() - import sys \ No newline at end of file diff --git a/supervisor.conf b/supervisor.conf index 2d7c651..51704a8 100644 --- a/supervisor.conf +++ b/supervisor.conf @@ -29,5 +29,5 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [eventlistener:quit_on_failure] -command=/usr/bin/python /var/lib/tt-rss-install/manage-supervisord.py +command=/usr/bin/php7 -r 'chdir("/var/lib/tt-rss"); while (true) { print("READY\n"); readline(); posix_kill(1, SIGTERM); print("RESULT 2\nOK"); }' events=PROCESS_STATE_FATAL