This commit is contained in:
Blallo 2018-08-17 16:37:49 +02:00
commit c3f8159eb2
4 changed files with 20 additions and 12 deletions

View file

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

View file

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

View file

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

@ -1 +1 @@
Subproject commit f92ac4994784529aa762068d18d40046f40779ac
Subproject commit 8cc47148eab56eba17f8bc0209b653920b180594