Docker-compose + tt-rss

https://git.tt-rss.org/fox/ttrss-docker-compose/commit/dff0116139a4b72a51b1676461d22d26793d8c85

i’ve implemented some fixes related to todays mini-clusterfuck of git.tt-rss.org going down: if local source is available on startup but attempt to update via git clone fails for some reason, container shouldn’t abort now.

I’m stuck trying to build the docker on Ubuntu 18. Here the errors I get:
db_1 | 2020-03-17 21:40:04.260 UTC [40] FATAL: password authentication failed for user “postgres”
db_1 | 2020-03-17 21:40:04.260 UTC [40] DETAIL: Role “postgres” does not exist.
db_1 | Connection matched pg_hba.conf line 95: “host all all all md5”
app_1 | psql: FATAL: password authentication failed for user “postgres”
Can someone please guide me to the right direction? Thanks :slight_smile:

since you obviously have no idea what you’re doing, try removing all containers with data (i.e. volumes) and start from scratch while not changing anything in .env and docker-compose.yml besides SELF_URL_PATH.

this really is a good illustration that you can’t make anything fool-proof, there’s always someone who will manage to break it by doing something unimaginably stupid.

wow, such a warm welcome.

ok, so I tried it again:
-deleted the whole cloned repo,
-cloned it again,
-copied .env-dist to .env and changed SELF_URL_TO_PATH to my local ip address,
-executed sudo docker-compose up --remove-orphans --force-recreate --build

result:

db_1 | 2020-03-18 19:34:13.018 UTC [56] FATAL: password authentication failed for user “postgres”
db_1 | 2020-03-18 19:34:13.018 UTC [56] DETAIL: Role “postgres” does not exist.
db_1 | Connection matched pg_hba.conf line 95: “host all all all md5”
updater_1 | PHP Warning: require_once(config.php): failed to open stream: No such file or directory in /var/www/html/tt-rss/include/functions.php on line 33
updater_1 | PHP Fatal error: require_once(): Failed opening required ‘config.php’ (include_path=‘/var/www/html/tt-rss/include:.:/usr/share/php7’) in /var/www/html/tt-rss/include/functions.php on line 33

I guess, you never worked for/in a serious IT company, just saying.
anyway, thanks for the help

doing this is not going to help.

your db container persistent storage volume has been initially set up with a different POSTGRES_USER as opposed to the one you’re trying to use now via .env.

docker-compose won’t remove named storage volumes, you have to do this yourself via docker cli. look for the db one specifically.

this whole thing is so absolutely basic and obvious i’m not even sure why i’m spoonfeeding you here, instead of probating you for your pathetic sass attempt quoted for posterity below:

:face_with_raised_eyebrow:

now your talking.

I wish you good luck with your tiny tiny app :joy:

Sorry for my totally noooooob questions but:

  • where is working directory with all php files??
  • how clean remove this installation with all folders - working and docking ???

TTRSS is my best software , thanks at all!

I found both answers - these were stupid questions :slight_smile:
sorry and thanks

Hi, I’m pretty new to docker but managed to get the container working. Now I want to add SSL.

Has anyone managed to get a reverse nginx proxy working? Trying to use the pretty popular letsencrypt proxy container:
nginx-proxy/docker-letsencrypt-nginx-proxy-companion

Any help or advice would be appreciated. Much thanks.

TTRSS worked perfectly and I was very happy with it on my Ubuntu 18.04 but unfortunately I had to reinstall the server and tried to reinstall it according to this self-description Git repository browser. Unfortunately, this time I don’t know why, but after installation on the site I get an:
Exception while creating PDO object: could not find driver.

Updater gives similar messages
updater_1 | <pre> Exception while creating PDO object: could not find driver </pre> ttrss docker_updater_1 exited with code 101
updater_1 | uid = 1000 (app) gid = 1000 (app) groups = 1000 (app), 1000 (app)
updater_1 | db: 5432 - accepting connections

from now on I don’t know what I could do to fix it, I removed containers several times and reinstalled the application without success

I found a similar symptom in TTRSS on the pages but I’m not sure if it has something to do with this:

$ config = array ();

$ config ['SELF_URL_PATH'] = env ('SELF_URL_PATH', 'http: // localhost');
$ config ['DB_HOST'] = env ('DB_HOST', 'postgres');
$ config ['DB_TYPE'] = 'pgsql';
$ config ['DB_HOST'] = env ('DB_HOST', 'database.postgres');
$ config ['DB_PORT'] = env ('DB_PORT', 5432);
$ config ['DB_NAME'] = env ('DB_NAME', 'ttrss');
$ config ['DB_USER'] = env ('DB_USER');

Is there anything I should still check to repair the reader?
basically I can’t imagine my life without it :frowning:

I think latest changes related to installer broke docker-compose setup which needs to be updated to the new syntax used in config.php-dist.

I’m gonna take a look at this now.

e: that’s because @JustAMacUser changed DB_* constant definitions to use double quotes (") instead of single quotes (’) and my docker preconfigure script couldn’t handle that.

e2: since the rest of it uses single quotes, i’m going to change it back instead of changing docker stuff, which should be done too i guess.

e3: or not, looks like i wasn’t entirely up to date from master. hmm.

anyway, this was related to the aforementioned changes but the actual cause is different - my docker scripts expected database type to be set to postgresql as default so i didn’t bother setting it when container is initialized.

quotes had nothing to do with it.

blame me i guess!

https://git.tt-rss.org/fox/ttrss-docker-compose/commit/9101ad6efc1a9277fd71f97a665250ec169f5fe0

^ fix for dynamic version

https://git.tt-rss.org/fox/ttrss-docker-compose/commit/47e56fa10ffce7906b12e68d86dbb950e1dafb87

^ fix for dockerhub version, i’m going to rebuild containers in a bit.

e: dockerhub images should be fixed now.

I apologize in advance if I write something stupid, I noooooob - I did this:

  • I tried to remove all ttrss_docker_ containers but it is even a problem with stopping them, previously it was not - received error like this on every container:

    Failure - Could not kill running container 76996b0635e293a873ed01d6d8847e93b2ca864e2c53c5e758908d8610ce4186, cannot remove - Cannot kill container 76996b0635e293a873ed01d6d8847e93b :ca2c8dd8c8d8

  • Finally, I had to pause the containers, restart the computer and remove the containers

  • I downloaded and installed your script from git

  • web page produce ERROR -Exception while creating PDO object:could not find driver

Im really sorry for that :frowning:

here is installation log:

Attaching to ttrss-docker_db_1, ttrss-docker_app_1, ttrss-docker_updater_1, ttrss-docker_web_1
db_1       |
db_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1       |
db_1       | 2020-04-23 14:46:03.022 UTC [1] LOG:  starting PostgreSQL 12.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.2.0) 9.2.0, 64-bit
db_1       | 2020-04-23 14:46:03.022 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1       | 2020-04-23 14:46:03.022 UTC [1] LOG:  listening on IPv6 address "::", port 5432
app_1      | db:5432 - accepting connections
db_1       | 2020-04-23 14:46:03.048 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1       | 2020-04-23 14:46:03.116 UTC [20] LOG:  database system was interrupted; last known up at 2020-04-23 14:21:55 UTC
app_1      | updating tt-rss source in /var/www/html/tt-rss from https://git.tt-rss.org/fox/tt-rss.git...
db_1       | 2020-04-23 14:46:03.210 UTC [20] LOG:  database system was not properly shut down; automatic recovery in progress
db_1       | 2020-04-23 14:46:03.229 UTC [20] LOG:  redo starts at 0/17C8C20
db_1       | 2020-04-23 14:46:03.229 UTC [20] LOG:  invalid record length at 0/17C8C58: wanted 24, got 0
db_1       | 2020-04-23 14:46:03.229 UTC [20] LOG:  redo done at 0/17C8C20
app_1      | From https://git.tt-rss.org/fox/tt-rss
app_1      |  * branch                master     -> FETCH_HEAD
db_1       | 2020-04-23 14:46:03.296 UTC [1] LOG:  database system is ready to accept connections
app_1      | Already up to date.
app_1      | updating plugins.local/nginx_xaccel...
app_1      | From https://git.tt-rss.org/fox/ttrss-nginx-xaccel
app_1      |  * branch            master     -> FETCH_HEAD
app_1      | Already up to date.
app_1      | NOTICE:  extension "pg_trgm" already exists, skipping
app_1      |  schema_version
app_1      | ----------------
app_1      |             139
app_1      | (1 row)
app_1      |
app_1      | [23-Apr-2020 14:46:06] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
app_1      | [23-Apr-2020 14:46:06] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
web_1      | Activating privacy features... done.
web_1      | 2020/04/23 14:46:07 [INFO][cache:0xc00019e280] Started certificate maintenance routine
web_1      |
web_1      | Serving HTTP on port 2015
web_1      | http://0.0.0.0:2015
web_1      |
web_1      | 2020/04/23 14:46:07 [INFO] Serving http://0.0.0.0:2015
web_1      | WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with `ulimit -n 8192`.
web_1      | 192.168.1.20 - - [23/Apr/2020:14:46:30 +0000] "GET / HTTP/1.1" 302 0
web_1      | 192.168.1.20 - - [23/Apr/2020:14:46:30 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:46:30 +0000] "GET /favicon.ico HTTP/1.1" 404 14
updater_1  | id: unknown user app
updater_1  | db:5432 - accepting connections
updater_1  | [14:46:36/12] Spawn interval: 120 sec
updater_1  | <pre>Exception while creating PDO object:could not find driver</pre>web_1      | 192.168.1.20 - - [23/Apr/2020:14:46:56 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:46:57 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
updater_1  | uid=1000(app) gid=1000(app) groups=1000(app),1000(app)
updater_1  | db:5432 - accepting connections
updater_1  | [14:47:08/9] Spawn interval: 120 sec
updater_1  | <pre>Exception while creating PDO object:could not find driver</pre>ttrss-docker_updater_1 exited with code 101
web_1      | 192.168.1.20 - - [23/Apr/2020:14:47:32 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:47:33 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
updater_1  | uid=1000(app) gid=1000(app) groups=1000(app),1000(app)
updater_1  | db:5432 - accepting connections
updater_1  | [14:47:39/11] Spawn interval: 120 sec
updater_1  | <pre>Exception while creating PDO object:could not find driver</pre>ttrss-docker_updater_1 exited with code 101
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:04 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:05 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:05 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:08 +0000] "GET /tt-rss/ HTTP/1.1" 200 68
updater_1  | uid=1000(app) gid=1000(app) groups=1000(app),1000(app)
updater_1  | db:5432 - accepting connections
updater_1  | [14:48:11/9] Spawn interval: 120 sec
updater_1  | <pre>Exception while creating PDO object:could not find driver</pre>ttrss-docker_updater_1 exited with code 101
updater_1  | uid=1000(app) gid=1000(app) groups=1000(app),1000(app)
updater_1  | db:5432 - accepting connections
updater_1  | [14:48:43/9] Spawn interval: 120 sec
updater_1  | <pre>Exception while creating PDO object:could not find driver</pre>ttrss-docker_updater_1 exited with code 101
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:45 +0000] "GET / HTTP/1.1" 302 0
web_1      | 192.168.1.20 - - [23/Apr/2020:14:48:45 +0000] "GET /tt-rss/ HTTP/1.1" 200 68

etc…

you need to remove tt-rss app persistent storage volume (docker volume ls | grep app should show it) or fix existing config.php manually inside the app volume:

docker volume inspect ttrss-docker_app_1 | grep Mountpoint

your volume name might be different.

e: alternatively you can find the volume, remove config.php and restart the container. if you can’t find it with docker volume ls for some reason it’s going to be somewhere in /var/lib/docker/volumes/some-volume-name/_data/tt-rss.

before new install I remove all folder with TTRSS, containers and images, so is it sense to do that ? I understood from that you wrote that the repository is already corrected ???

volume is the third thing you have to remove, this is where (broken) config.php is. if you don’t know what storage volume is or have any further questions related to locating it consider reading docker documentation.

I edited /var/www/html/tt-rss/update.php to below and works perfect, thank You for help!

    define('DB_TYPE', "%DB_TYPE");  -> 'pgsql'
    define('DB_PORT', '');  -> '5432'

sorry - i was config.php

Hello, in some queries I get 504 Gateway Timeout and I would like to change some server settings in nginx.conf
Could I ask for a hint where to find him?

Hello! I am trying to enable password recovery by email using an external SMTP server.

To do that, I have installed, enabled and configured the system plugin ttrss-mailer-smtp.

But then when I try to recover a password for an account, I get this error: Extension missing: openssl

After looking online a bit, this seems to be caused by php not having the openssl extension installed and/or enabled in php.ini.

Thus I looked into the app Dockerfile (from ttrss-docker-compose, branch static-dockerhub), and noticed that php7-openssl is not part of the installed modules, and that php.ini is not modified to enable openssl.

Is it possible to update the Dockerfile to add these changes, to give people the possibility to use plugins that require openssl, such as the mailer?

thanks in advance and thanks for your work! cheers