Does not honor env pass
As mentioned before issue tracking;
docker run -it --name ttrsspg -e DB_HOST=172.17.0.1 -e SU_USER=admin -e DB_USER=ttrss x86dev/docker-ttrss
still results in
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Address not available Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? in /var/www/ttrss/classes/db/pgsql.php on line 21 PHP Warning: pg_last_error(): No PostgreSQL link opened yet in /var/www/ttrss/classes/db/pgsql.php on line 24 Unable to connect to database (as fox to localhost, database fox):[18:01:31/310] Spawn interval: 120 sec PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting
It turns out that there are a number of things you need to set to get the database configuration script to run through happily. See root/srv/ttrss-configure-db.php for exactly what's going on. Try adding these:
- DB_PORT=5432
- DB_PORT_5432_TCP_ADDR=172.17.0.1 (to use your example)
- DB_PORT_5432_TCP_PORT=5432
(Those last two will get automatically set under some conditions if you use --link [somecontainer]:db, but not, say, with docker-compose and a Compose file of version 2 or later.)
The latest updates to the Docker image should work with those environment parameters -- just tested that myself.
I docker rmi-ed and pulled a fresh image down. I still cannot get this to connect to postgres on 172.17.0.1 or get my user in. Still connects as fox to localhost database fox.