Bugfixes.

This commit is contained in:
x86dev 2015-09-15 21:46:44 +02:00
parent 6c1af3b2a5
commit 64aa4f3e42
6 changed files with 13 additions and 15 deletions

View File

@ -3,9 +3,7 @@ FROM kdelfour/supervisor-docker
MAINTAINER Andreas Löffler <andy@x86dev.com>
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

4
service-ttrss-daemon.conf Executable file
View File

@ -0,0 +1,4 @@
[program:ttrss-daemon]
command=/usr/bin/php /var/www/ttrss/update_daemon2.php
user=www-data
redirect_stderr=true

View File

@ -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

View File

@ -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()

View File

@ -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.

View File

@ -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/<? */<?php/" ${TTRSS_PATH}/plugins/mobilize/m.php
# Patch ttrss-mobilize plugin for getting it to work.
sed -i -e "s/<?$/<?php/g" ${TTRSS_PATH}/plugins/mobilize/m.php
}
# For use with News+ on Android. Buy the Pro version -- I love it!