From 64aa4f3e425de6b514c82df46fd84137237ad2b6 Mon Sep 17 00:00:00 2001 From: x86dev Date: Tue, 15 Sep 2015 21:46:44 +0200 Subject: [PATCH] Bugfixes. --- Dockerfile | 10 ++-------- service-ttrss-daemon.conf | 4 ++++ service-ttrss-update.conf | 6 +++--- setup-ttrss.sh | 2 +- start-ttrss.sh | 2 +- update-ttrss.sh | 4 ++-- 6 files changed, 13 insertions(+), 15 deletions(-) create mode 100755 service-ttrss-daemon.conf diff --git a/Dockerfile b/Dockerfile index ad90080..a8cb6aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,7 @@ FROM kdelfour/supervisor-docker MAINTAINER Andreas Löffler RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ - nginx git ca-certificates php5-fpm php5-cli php5-curl php5-gd php5-json \ - php5-pgsql -# php5-mysql + nginx git ca-certificates php5-fpm php5-cli php5-curl php5-gd php5-json php5-pgsql # add ttrss as the only Nginx site ADD ttrss-nginx.conf /etc/nginx/sites-available/ttrss @@ -31,7 +29,6 @@ ENV DB_USER ttrss ENV DB_PASS ttrss # always re-configure database with current ENV when RUNning container, then monitor all services -## @todo pack the scripts to a .zip, ADD this and RUN it in setup.sh. Later. RUN mkdir -p /srv ADD ttrss-utils.php /srv/ttrss-utils.php ADD ttrss-configure-db.php /srv/ttrss-configure-db.php @@ -42,13 +39,10 @@ ADD setup-ttrss.sh /srv/setup-ttrss.sh ADD update-ttrss.sh /srv/update-ttrss.sh ADD start-ttrss.sh /srv/start-ttrss.sh -# add updater script for rolling release model -- currently runs on a daily basis -RUN ln -s /srv/update-ttrss.sh /etc/cron.daily/update-ttrss.sh -RUN service cron restart - RUN mkdir -p /etc/supervisor/conf.d ADD service-nginx.conf /etc/supervisor/conf.d/nginx.conf ADD service-php5-fpm.conf /etc/supervisor/conf.d/php5.conf +ADD service-ttrss-daemon.conf /etc/supervisor/conf.d/ttrss-daemon.conf ADD service-ttrss-update.conf /etc/supervisor/conf.d/ttrss-update.conf # only run the setup once diff --git a/service-ttrss-daemon.conf b/service-ttrss-daemon.conf new file mode 100755 index 0000000..8963820 --- /dev/null +++ b/service-ttrss-daemon.conf @@ -0,0 +1,4 @@ +[program:ttrss-daemon] +command=/usr/bin/php /var/www/ttrss/update_daemon2.php +user=www-data +redirect_stderr=true diff --git a/service-ttrss-update.conf b/service-ttrss-update.conf index 8963820..933828d 100755 --- a/service-ttrss-update.conf +++ b/service-ttrss-update.conf @@ -1,4 +1,4 @@ -[program:ttrss-daemon] -command=/usr/bin/php /var/www/ttrss/update_daemon2.php -user=www-data +[program:ttrss-update] +command=/srv/update-ttrss.sh +user=root redirect_stderr=true diff --git a/setup-ttrss.sh b/setup-ttrss.sh index cb32633..6d374d0 100755 --- a/setup-ttrss.sh +++ b/setup-ttrss.sh @@ -26,7 +26,7 @@ setup_nginx() fi # Configure Nginx so that is doesn't show its version number in the HTTP headers. - sed -i -e "s/.*server_tokens.*/server_tokens off;/g" /etc/nginx/nginx.conf + sed -i -e "s/.*server_tokens\s.*/server_tokens off;/g" /etc/nginx/nginx.conf } setup_ttrss() diff --git a/start-ttrss.sh b/start-ttrss.sh index 6437328..4dd1f44 100755 --- a/start-ttrss.sh +++ b/start-ttrss.sh @@ -6,7 +6,7 @@ set -e supervisorctl stop all # Update configuration. This is necessary for entering the current IP + PORT of the database. -/srv/update-ttrss.sh +/srv/update-ttrss.sh --no-start # Start supervisord. # This will start all other dependencies. diff --git a/update-ttrss.sh b/update-ttrss.sh index fe554b2..b42d9cb 100755 --- a/update-ttrss.sh +++ b/update-ttrss.sh @@ -20,8 +20,8 @@ update_plugin_mobilize() echo "Updating: Mobilize plugin" ( cd ${TTRSS_PATH}/plugins/mobilize && git pull origin master ) - # Patch ttrss-mobilize plugin for getting it to work - sed -i -e "s/