Closed reibuehl closed 5 years ago
I tried also setting the environment variable DB_HOST=db in the docker-compose.yaml file but that did not make a difference. During startup, I see that it is apparently not used:
ttrss | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
ttrss | [s6-init] ensuring user provided files have correct perms...exited 0.
ttrss | [fix-attrs.d] applying ownership & permissions fixes...
ttrss | [fix-attrs.d] done.
ttrss | [cont-init.d] executing container initialization scripts...
ttrss | [cont-init.d] 50-php: executing...
ttrss | rm: can't remove '/usr/sbin/php-fpm': No such file or directory
ttrss | [cont-init.d] 50-php: exited 0.
ttrss | [cont-init.d] 98-wait-for-db: executing...
ttrss | Checking database responds within 1s on :5432...
ttrss | Error: you need to provide a host and port to test.
ttrss | Usage:
ttrss | host:port [-t timeout] [-- command args]
ttrss | -q | --quiet Do not output any status messages
ttrss | -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
ttrss | -- COMMAND ARGS Execute command with args after the test finishes
Try setting DB_PORT_5432_TCP_ADDR=ttrssdb
to the environment.
I experienced the same problem before. This solution is not written in the document, so I think improvement is necessary.
@yuuki0xff Do I need one more variable? If I set DB_PORT_5432_TCP_ADDR
, the first error is gone and the wait-for-db seems to succeed but later I get errors again about DB_PORT:
ttrss | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
ttrss | [s6-init] ensuring user provided files have correct perms...exited 0.
ttrss | [fix-attrs.d] applying ownership & permissions fixes...
ttrss | [fix-attrs.d] done.
ttrss | [cont-init.d] executing container initialization scripts...
ttrss | [cont-init.d] 50-php: executing...
ttrss | rm: can't remove '/usr/sbin/php-fpm': No such file or directory
ttrss | [cont-init.d] 50-php: exited 0.
ttrss | [cont-init.d] 98-wait-for-db: executing...
ttrss | Checking database responds within 1s on ttrssdb:5432...
ttrss | [cont-init.d] 98-wait-for-db: exited 0.
ttrss | [cont-init.d] 99-ttrss: executing...
ttrss | Setup: !!! WARNING - No encryption (TLS) used - WARNING !!!
ttrss | Setup: !!! This is not recommended for a production server !!!
ttrss | Setup: You have been warned.
ttrss | Setup: Setting up Tiny Tiny RSS (latest revision) ...
ttrss | Cloning into '/var/www/ttrss'...
ttrss | Cloning into '/var/www/ttrss/plugins.local/mobilize'...
ttrss | Cloning into '/var/www/ttrss/plugins.local/feediron'...
ttrss | Cloning into '/var/www/ttrss/themes.local/levito-feedly-git'...
ttrss | Cloning into '/var/www/ttrss/themes.local/gravemind-feedly-git'...
ttrss | Setup: URL is: http://localhost/
ttrss | Setup: Additional plugins:
ttrss | Setup: Database
ttrss | Configuring database for: /var/www/ttrss/config.php
ttrss | Error: The env DB_PORT does not exist. Make sure to run with "--link mypostgresinstance:DB"
ttrss | Error: The env DB_PORT does not exist. Make sure to run with "--link mypostgresinstance:DB"
ttrss | Setup: Applying updates ...
ttrss | Updating: Tiny Tiny RSS
ttrss | From https://git.tt-rss.org/git/tt-rss
ttrss | * branch HEAD -> FETCH_HEAD
ttrss | Already up-to-date.
ttrss | Updating: Mobilize plugin
ttrss | From https://github.com/sepich/tt-rss-mobilize
ttrss | * branch HEAD -> FETCH_HEAD
ttrss | Already up-to-date.
ttrss | Updating: FeedIron
ttrss | From https://github.com/m42e/ttrss_plugin-feediron
ttrss | * branch HEAD -> FETCH_HEAD
ttrss | Already up-to-date.
ttrss | Updating: Themes
ttrss | From https://github.com/levito/tt-rss-feedly-theme
ttrss | * branch HEAD -> FETCH_HEAD
I tried also setting DB_PORT and then DB__PORT_5432_TCP_PORT but then I get errors accessing the DB with the username and password provided.
@reibuehl did you get it working? for me it is working with the following config:
- DB_PORT_5432_TCP_ADDR=ttrssdb
- DB_PORT_5432_TCP_PORT=5432
- DB_HOST=ttrssdb
- DB_PORT=5432
- DB_NAME=ttrss
- DB_USER=ttrss
- DB_PASS=ttrss
(also try to remove the links section form the docker-compose setup, it's not required with the correct environment variables)
I will try it later. For the moment I have given up and installed tt-rss native on the host.
Closing this issue since it seems to be only my local issue.
I have setup the postgres db as a container using the following settings in docker-compose:
and I use the links directive to connect this container to the ttrss container:
but I get errors that the db can't be reached:
Am I missing an environment variable? Shouldn't the host "db" be used by ttrss instead of "localhost"?