habakuk
1
Hello,
in my config file I have these entries:
define('DB_TYPE', 'pgsql');
define('DB_HOST', '/home/haba/tmp/');
define('DB_USER', 'tinyrss');
define('DB_NAME', 'tinyrss');
define('DB_PASS', 'abc');
define('DB_PORT', '5432');
And the file /home/haba/tmp/.s.PGSQL.5432 is available.
But if I try to open my ttrss instance I get this error:
Exception while creating PDO object:SQLSTATE[08006] [7] could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Any idea what happened?
fox
2
what happened is that you were late to the party and got a two week probation.
seems that config format has changed:
all ādefineā entries are invalid now
try the following:
putenv('TTRSS_DB_TYPE=pgsql');
putenv('TTRSS_DB_HOST=/home/haba/tmp/');
putenv('TTRSS_DB_USER=tinyrss');
putenv('TTRSS_DB_NAME=tinyrss');
putenv('TTRSS_DB_PASS=abc');
putenv('TTRSS_DB_PORT=5432');
would be nice if a template file with the new format would be delivered, like it was in the old format 

Using docker-compose is the blessed way to run tt-rss, and it updates tt-rss on startup. But there is no notification when the docker-compose distributions needs to be updated. This leads to not wanting to update anything because of things breaking.
Iām wondering if semantic versioning with a changelog could help. This way people can pin to versions, and have documentation of changes. All while giving you the ability to tell UPDATE when they are on an old version.
shabble
7
Well, the non-docker version (now) has this:
$ cat config.php-dist
<?php
/*
This file can be used to customize global defaults if environment method is not available (i.e. no Docker).
Use the following syntax to override defaults (options are declared in classes/config.php, prefixed by TTRSS_):
putenv('TTRSS_DB_HOST=myserver');
putenv('TTRSS_SELF_URL_PATH=http://example.com/tt-rss');
Plugin-required constants also go here, using define():
define('LEGACY_CONSTANT', 'value');
etc.
See this page for more information: https://tt-rss.org/wiki/GlobalConfig
*/
Previously
<?php
// *******************************************
// *** Database configuration (important!) ***
// *******************************************
define('DB_TYPE', "pgsql"); // or mysql
define('DB_HOST', "localhost");
define('DB_USER', "fox");
define('DB_NAME', "fox");
define('DB_PASS', "XXXXXX");
define('DB_PORT', ''); // usually 5432 for PostgreSQL, 3306 for MySQL
define('MYSQL_CHARSET', 'UTF8');
// Connection charset for MySQL. If you have a legacy database and/or experience
// garbage unicode characters with this option, try setting it to a blank string.
// ***********************************
// *** Basic settings (important!) ***
// ***********************************
define('SELF_URL_PATH', 'https://example.org/tt-rss/');
// This should be set to a fully qualified URL used to access
// your tt-rss instance over the net.
// The value should be a constant string literal. Please don't use
// PHP server variables here - you might introduce security
// issues on your install and cause hard to debug problems.
// If your tt-rss instance is behind a reverse proxy, use the external URL.
define('SINGLE_USER_MODE', false);
// Operate in single user mode, disables all functionality related to
// multiple users and authentication. Enabling this assumes you have
// your tt-rss directory protected by other means (e.g. http auth).
define('SIMPLE_UPDATE_MODE', false);
// Enables fallback update mode where tt-rss tries to update feeds in
// 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
// background processes while not running tt-rss, this method is generally
// viable to keep your feeds up to date.
// Still, there are more robust (and recommended) updating methods
// available, you can read about them here: http://tt-rss.org/wiki/UpdatingFeeds
<blah, etc, blah>
Not sure what more could be done TBHā¦
fox
8
what? thereās literally a notification in the UI
what?
what? there already is a āsemantic versioningā with git commit id being a part of it.
have you noticed how thereās a docker hub image tagged for every changeset? itās so people could do just that, if needed.
the documentation of changes is called git log.
i donāt want updates to be opt-in.
people would inevitably stay on some random commit from half a year ago, etc. re-read the docker thread to see how this whole thing started.
fox
9
whatās the point? defaults are now defined in classes/config.php, you only need to override things as needed. this template would either be empty (like right now) or duplicate the aforementioned class for no reason.
on my point of view, it is just more userfriendly if you have an template with the most common options and an short description for each point. 
maybe you can add the descriptions to the classes/config.php file. would also be a good solution i think
fox
11
yes, pretty much. i was meaning to do this at some point.
One thing I just ran into, you used to be able to set DB_HOST to an empty string and it would work to āuse the local system defaultā. Trying to do that with the new env-based setup leads to the default of ādbā being picked up. Thatās not a valid hostname on my setup so fails.
So I had to explicitly set it to ālocalhostā on my non-docker setup (which Iām only still running to ensure everything transferred across correctly over to the new docker-compose setup).