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"?
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.
$ 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>
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.
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).