From 0f429ac5d69f07ba94828d445ea3c24dc25b8870 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 17 Aug 2018 15:56:50 +0200 Subject: [PATCH 1/3] [TT] dockerfile reorganized; apk upgrade --- docker/Dockerfile-tt-rss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile-tt-rss b/docker/Dockerfile-tt-rss index de8498b..c3b9db0 100644 --- a/docker/Dockerfile-tt-rss +++ b/docker/Dockerfile-tt-rss @@ -1,5 +1,11 @@ FROM ulsmith/alpine-apache-php7 -RUN apk add --update php7-pgsql php7-fileinfo openrc postgresql-client && apk del php7-pdo_mysql php7-pdo_odbc php7-pdo_sqlite db php7-redis php7-ftp && rm -rf /var/cache/apk/ +RUN apk update && apk upgrade && apk add util-linux php7-pgsql php7-fileinfo openrc postgresql-client && apk del php7-pdo_mysql php7-pdo_odbc php7-pdo_sqlite db php7-redis php7-ftp && rm -rf /var/cache/apk/ + +COPY tt-rss/* /app/public/tt-rss/ +COPY docker/ttrss-openrc-apache /etc/init.d/apache +COPY docker/ttrss-openrc-ttrssupdate /etc/init.d/ttrssupdate +COPY docker/ttrss-openrc-ntpd /etc/init.d/ntpd + RUN mkdir -p /app/public/tt-rss/ /var/cache/tt-rss/images \ /var/cache/tt-rss/upload /var/cache/tt-rss/export/ \ /var/cache/tt-rss/js /var/lock/tt-rss/ && \ @@ -20,14 +26,8 @@ RUN mkdir -p /app/public/tt-rss/ /var/cache/tt-rss/images \ sed -i '/^ntpd/d' /bootstrap/start.sh &&\ echo -e 'log_errors = On\nerror_log = syslog' >> /etc/php7/php.ini &&\ sed -i -r 's@ErrorLog .*@ErrorLog "|/usr/bin/logger -n syslog -T -P 514 -t apacheErr"@i' /etc/apache2/httpd.conf &&\ - echo 'TransferLog "|/usr/bin/logger -n syslog -T -P 514 -t apacheLog"' >> /etc/apache2/httpd.conf -RUN apk --no-cache add util-linux - -COPY tt-rss/* /app/public/tt-rss/ -COPY docker/ttrss-openrc-apache /etc/init.d/apache -COPY docker/ttrss-openrc-ttrssupdate /etc/init.d/ttrssupdate -COPY docker/ttrss-openrc-ntpd /etc/init.d/ntpd -RUN rc-update add ntpd && rc-update add apache && rc-update add ttrssupdate + echo 'TransferLog "|/usr/bin/logger -n syslog -T -P 514 -t apacheLog"' >> /etc/apache2/httpd.conf &&\ + rc-update add ntpd && rc-update add apache && rc-update add ttrssupdate ENTRYPOINT [] From 4e98f9ec9b410da08184b86c06a0840498e510b9 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 17 Aug 2018 16:01:19 +0200 Subject: [PATCH 2/3] [BR] FIX rss-bridge has working cache --- rss-bridge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rss-bridge b/rss-bridge index f92ac49..8cc4714 160000 --- a/rss-bridge +++ b/rss-bridge @@ -1 +1 @@ -Subproject commit f92ac4994784529aa762068d18d40046f40779ac +Subproject commit 8cc47148eab56eba17f8bc0209b653920b180594 From a146cf06afe82587b3723cc239d518fb3f4ed4bf Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 17 Aug 2018 16:27:29 +0200 Subject: [PATCH 3/3] doit support for newer versions --- README.md | 2 +- dodo_utils.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 993eaee..1f816da 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Serve installare le seguenti cosucce: - docker - docker-compose - `go get 'github.com/betalo-sweden/await'` (serve Go >= 1.8) - - [doit](http://pydoit.org/) (`pip3 install doit` or `apt-get install python3-doit`) + - [doit](http://pydoit.org/) (`pip3 install doit==0.31` or `apt-get install python3-doit`) ## Lanciare diff --git a/dodo_utils.py b/dodo_utils.py index add5aeb..215821c 100644 --- a/dodo_utils.py +++ b/dodo_utils.py @@ -89,10 +89,18 @@ def run(cmd, **kwargs): def run_task_func(taskf): ret = taskf() tasks = loader.generate_tasks(taskf.__name__, ret, taskf.__doc__) + try: + from doit.task import Stream + stream = Stream(0) + except ImportError: + stream = None def fun(): for task in tasks: - task.execute() + if stream is None: + task.execute() + else: + task.execute(stream) return True if tasks: fun.__doc__ = '\n'.join(t.doc for t in tasks)