From 2dfb698e802d4deca0aaead8dfed53adbcd5ed59 Mon Sep 17 00:00:00 2001 From: boyska Date: Sun, 19 Aug 2018 14:57:31 +0200 Subject: [PATCH] [TT] icons are saved in /var/lib/ --- docker-compose.yml | 2 ++ docker/Dockerfile-tt-rss | 8 ++++---- docker/ttrss-apache-tt.conf | 11 +++++++++++ docker/ttrss-config.php | 2 +- dodo.py | 4 +--- 5 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 docker/ttrss-apache-tt.conf diff --git a/docker-compose.yml b/docker-compose.yml index 9635efd..00c2695 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: volumes: - ./tt-rss:/app/public/tt-rss/ - ./docker/ttrss-config.php:/app/public/tt-rss/config.php:ro + - ./docker/ttrss-apache-tt.conf:/etc/apache2/conf.d/tt.conf:ro ports: - 8000:80 - 9312:9312 @@ -39,6 +40,7 @@ services: - PHP_DISPLAY_ERRORS=stdout - PHP_DISPLAY_STARTUP_ERROR=1 entrypoint: 'wait-db php7 /app/public/tt-rss/update.php --daemon' + ports: [] depends_on: - db diff --git a/docker/Dockerfile-tt-rss b/docker/Dockerfile-tt-rss index 4735268..1b5d911 100644 --- a/docker/Dockerfile-tt-rss +++ b/docker/Dockerfile-tt-rss @@ -3,15 +3,15 @@ RUN apk update && apk upgrade && apk add util-linux php7-pgsql php7-fileinfo ope COPY tt-rss/* /app/public/tt-rss/ COPY docker/wait-db /usr/bin/ +COPY docker/ttrss-apache-tt.conf /etc/apache2/conf.d/tt.conf 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/ && \ - chown -R apache:root /app/public /var/cache/tt-rss/ /var/lock/tt-rss/ && \ + /var/cache/tt-rss/js /var/lock/tt-rss/ /var/lib/tt-rss/feed-icons/ && \ + chown -R apache:root /app/public /var/cache/tt-rss/ /var/lock/tt-rss/ /var/lib/tt-rss/ && \ echo -e 'log_errors = On\nerror_log = syslog' >> /etc/php7/php.ini &&\ sed -i '/^Listen/d' /etc/apache2/httpd.conf &&\ - sed -i -r 's@ErrorLog .*@ErrorLog "/proc/self/fd/2"@i' /etc/apache2/httpd.conf &&\ - echo -e 'TransferLog "/proc/self/fd/1"\nListen 0.0.0.0:80' >> /etc/apache2/httpd.conf + sed -i -r 's@ErrorLog .*@ErrorLog "/proc/self/fd/2"@i' /etc/apache2/httpd.conf # vim: set ft=dockerfile: diff --git a/docker/ttrss-apache-tt.conf b/docker/ttrss-apache-tt.conf new file mode 100644 index 0000000..ef8e502 --- /dev/null +++ b/docker/ttrss-apache-tt.conf @@ -0,0 +1,11 @@ +TransferLog "/proc/self/fd/1" +Listen 0.0.0.0:80 +Alias "/tt-rss/ico" "/var/lib/tt-rss/feed-icons/" + +Require all granted +Options -Indexes +AllowOverride None + + +# vim: set bkc=yes ft=apache: + diff --git a/docker/ttrss-config.php b/docker/ttrss-config.php index 208552e..868270e 100644 --- a/docker/ttrss-config.php +++ b/docker/ttrss-config.php @@ -68,7 +68,7 @@ define('CACHE_DIR', '/var/cache/tt-rss'); // Local cache directory for RSS feed content. - define('ICONS_DIR', "feed-icons"); + define('ICONS_DIR', "/var/lib/tt-rss/feed-icons"); define('ICONS_URL', "feed-icons"); // Local and URL path to the directory, where feed favicons are stored. // Unless you really know what you're doing, please keep those relative diff --git a/dodo.py b/dodo.py index ce552f0..4b4d4f8 100644 --- a/dodo.py +++ b/dodo.py @@ -87,10 +87,8 @@ def task_dbprepare(): def task__fix_perms(): '''fix permissions for shared www dir''' + # currently empty, but keeping it for later use return { - 'actions': [ - 'chmod -R 777 tt-rss/feed-icons/ || true' - ] }