Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not honor env pass #7

Open
bobberb opened this issue Jun 14, 2017 · 3 comments
Open

Does not honor env pass #7

bobberb opened this issue Jun 14, 2017 · 3 comments

Comments

@bobberb
Copy link

bobberb commented Jun 14, 2017

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

@aschmitz
Copy link

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.)

@x86dev
Copy link
Owner

x86dev commented Jul 25, 2017

The latest updates to the Docker image should work with those environment parameters -- just tested that myself.

@bobberb
Copy link
Author

bobberb commented Sep 21, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants