basic config

This commit is contained in:
Mathieu Bruyen
2018-12-13 13:55:19 +01:00
parent 2c02fcce22
commit a709246496
3 changed files with 56 additions and 36 deletions

View File

@@ -1,15 +1,6 @@
FROM alpine:3.8 FROM nginx:1.15.7-alpine
# https://git.tt-rss.org/fox/tt-rss/wiki/InstallationNotes
# https://github.com/clue/docker-ttrss/blob/master/Dockerfile
# https://github.com/linuxserver/docker-tt-rss/blob/master/Dockerfile
ADD https://git.tt-rss.org/fox/tt-rss/archive/18.12.tar.gz /tmp/ttrss.tar.gz
RUN tar -xzf /tmp/ttrss.tar.gz
RUN \ RUN \
echo "**** install packages ****" && \
apk add --no-cache \ apk add --no-cache \
curl \ curl \
php7-apcu \ php7-apcu \
@@ -23,8 +14,17 @@ RUN \
php7-pdo_pgsql \ php7-pdo_pgsql \
php7-pgsql \ php7-pgsql \
php7-posix \ php7-posix \
tar && \ php7-fpm \
echo "**** link php7 to php ****" && \ tar
ln -sf /usr/bin/php7 /usr/bin/php RUN ln -sf /usr/bin/php7 /usr/bin/php
#copy config + delete install.php EXPOSE 80 443
COPY nginx.conf /etc/nginx/conf.d/default.conf
ADD https://git.tt-rss.org/fox/tt-rss/archive/18.12.tar.gz /tmp/ttrss.tar.gz
RUN tar -xzf /tmp/ttrss.tar.gz -C /var/lib
COPY config.php /var/lib/tt-rss/config.php
CMD php-fpm7 && nginx -g "daemon off;"

View File

@@ -3,12 +3,14 @@
// *** Database configuration (important!) *** // *** Database configuration (important!) ***
// ******************************************* // *******************************************
define('DB_TYPE', "pgsql"); // or mysql $postgres_uri = getenv('DATABASE_URL');
define('DB_HOST', "localhost"); preg_match('^postgres://(.*):(.*)@(.*):(.*)/(.*)$', getenv('DATABASE_URL'), $matches)
define('DB_USER', "fox"); define('DB_TYPE', "pgsql");
define('DB_NAME', "fox"); define('DB_HOST', $matches[3]);
define('DB_PASS', "XXXXXX"); define('DB_USER', $matches[1]);
define('DB_PORT', ''); // usually 5432 for PostgreSQL, 3306 for MySQL define('DB_NAME', $matches[5]);
define('DB_PASS', $matches[2]);
define('DB_PORT', $matches[4]);
define('MYSQL_CHARSET', 'UTF8'); define('MYSQL_CHARSET', 'UTF8');
// Connection charset for MySQL. If you have a legacy database and/or experience // Connection charset for MySQL. If you have a legacy database and/or experience
@@ -18,18 +20,18 @@
// *** Basic settings (important!) *** // *** Basic settings (important!) ***
// *********************************** // ***********************************
define('SELF_URL_PATH', 'http://example.org/tt-rss/'); define('SELF_URL_PATH', 'https://feeds.mais-h.eu');
// Full URL of your tt-rss installation. This should be set to the // 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/ // location of tt-rss directory, e.g. http://example.org/tt-rss/
// You need to set this option correctly otherwise several features // You need to set this option correctly otherwise several features
// including PUSH, bookmarklets and browser integration will not work properly. // including PUSH, bookmarklets and browser integration will not work properly.
define('SINGLE_USER_MODE', false); define('SINGLE_USER_MODE', true);
// Operate in single user mode, disables all functionality related to // Operate in single user mode, disables all functionality related to
// multiple users and authentication. Enabling this assumes you have // multiple users and authentication. Enabling this assumes you have
// your tt-rss directory protected by other means (e.g. http auth). // your tt-rss directory protected by other means (e.g. http auth).
define('SIMPLE_UPDATE_MODE', false); define('SIMPLE_UPDATE_MODE', true);
// Enables fallback update mode where tt-rss tries to update feeds in // Enables fallback update mode where tt-rss tries to update feeds in
// background while tt-rss is open in your browser. // background while tt-rss is open in your browser.
// If you don't have a lot of feeds and don't want to or can't run // If you don't have a lot of feeds and don't want to or can't run

18
nginx.conf Normal file
View File

@@ -0,0 +1,18 @@
server {
listen 80;
root /var/lib/tt-rss;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.html /index.php?$args =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}