Browse Source

tt-rss moved to /tt-rss/

also, state dirs are moved to /var/cache/ and /var/lock/, thus avoiding
their unneeded "copy" to host.
ICONS_DIR is still pointing to documentroot, so this is not yet
complete.
boyska 5 years ago
parent
commit
efbcbc8204
5 changed files with 12 additions and 10 deletions
  1. 2 2
      docker-compose.yml
  2. 5 2
      docker/Dockerfile-tt-rss
  3. 1 1
      docker/nginx.conf
  4. 3 3
      docker/ttrss-config.php
  5. 1 2
      dodo.py

+ 2 - 2
docker-compose.yml

@@ -20,8 +20,8 @@ services:
             dockerfile: ./docker/Dockerfile-tt-rss
         container_name: feedati_tt_rss
         volumes:
-            - ./tt-rss:/app/public/
-            - ./docker/ttrss-config.php:/app/public/config.php:ro
+            - ./tt-rss:/app/public/tt-rss/
+            - ./docker/ttrss-config.php:/app/public/tt-rss/config.php:ro
         ports:
             - 8000:80
             - 9312:9312

+ 5 - 2
docker/Dockerfile-tt-rss

@@ -1,4 +1,7 @@
 FROM ulsmith/alpine-apache-php7
 RUN apk add --update php7-pgsql php7-fileinfo && 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/
-RUN chown -R apache:root /app/public
+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/
+RUN chown -R apache:root /app/public /var/cache/tt-rss/ /var/lock/tt-rss/
+COPY tt-rss/* /app/public/tt-rss/
+
+# vim: set ft=dockerfile:

+ 1 - 1
docker/nginx.conf

@@ -8,7 +8,7 @@ server {
 
     location /tt-rss {
         resolver              127.0.0.11 ipv6=off;
-        proxy_pass            http://tt-rss/;
+        proxy_pass            http://tt-rss/tt-rss;
         proxy_read_timeout    60s;
         proxy_connect_timeout 4s;
         proxy_set_header      Host $host;

+ 3 - 3
docker/ttrss-config.php

@@ -18,7 +18,7 @@
 	// *** Basic settings (important!) ***
 	// ***********************************
 
-	define('SELF_URL_PATH', 'http://localhost');
+	define('SELF_URL_PATH', 'http://localhost/tt-rss/');
 	// Full URL of your tt-rss installation. This should be set to the
 	// location of tt-rss directory, e.g. http://example.org/tt-rss/
 	// You need to set this option correctly otherwise several features
@@ -61,11 +61,11 @@
 	// then most probably you are using the CGI binary. If you are unsure what to
 	// put in here, ask your hosting provider.
 
-	define('LOCK_DIRECTORY', 'lock');
+	define('LOCK_DIRECTORY', '/var/lock/tt-rss');
 	// Directory for lockfiles, must be writable to the user you run
 	// daemon process or cronjobs under.
 
-	define('CACHE_DIR', 'cache');
+	define('CACHE_DIR', '/var/cache/tt-rss');
 	// Local cache directory for RSS feed content.
 
 	define('ICONS_DIR', "feed-icons");

+ 1 - 2
dodo.py

@@ -84,8 +84,7 @@ def task__fix_perms():
     '''fix permissions for shared www dir'''
     return {
         'actions': [
-            'chmod -R 777 tt-rss/feed-icons/ tt-rss/cache/ tt-rss/lock/'
-            .split()
+            'chmod -R 777 tt-rss/feed-icons/ || true'
         ]
     }