forked from clue/docker-ttrss
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Stop depending on automatically created environment variables #25
Comments
Please fix this and update the docs to not use link anymore. |
Try
talmai/docker-ttrss latest c605e9789115 7 weeks
ago 403MB
…On Mon, Jun 11, 2018 at 5:58 AM, Johannes Wienke ***@***.***> wrote:
Please fix this and update the docs to not use link anymore.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABzd_MCP1PoLB17JvL2jmGFQBFSBz2iOks5t7j8tgaJpZM4Rls-z>
.
|
This should be mentioned in the documentation. Maybe also provide an example docker-compose? |
I did not try it myself yet, but https://github.com/sheveko/docker-ttrss seems to have corrected this issue with sheveko@21fd22a. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To work, the ttrss-configure-db.php script depends on the environment variables automatically created by the "--link" flag of the docker run command. Example: DB_PORT_5432_TCP_ADDR (
docker-ttrss/root/srv/ttrss-configure-db.php
Line 27 in d3ff6b0
Per the Docker documentation, the --link flag is a legacy feature (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/). In addition, when creating the TTRSS and POSTGRESSQL containers with a docker-compose file instead of the run command, a bridge network is automatically created and used by these services instead of using the default bridge network. With "user-defined" networks (or docker-compose created networks), as opposed to the default bridge network, those automatic environment variables are not created even when using the "link:" config in the docker-compose file.
I think the script should be changed to use user-specified variables (DB_HOST=postgres, DB_PORT=5432, DB_TYPE=pgsql) if present in the docker-compose file, and if not, continue to be generated by the script from the legacy automatic environment variable.
I think a way of implementing this could be how it was done there around the lines 11-45 https://github.com/clue/docker-ttrss/blob/master/configure-db.php#L28
In the mean time, to make it work I just manually specified in my docker-compose file the environment variables the legacy --link flag was creating, which are:
DB_PORT=tcp://db:5432
DB_PORT_5432_TCP=tcp://db:5432
DB_PORT_5432_TCP_ADDR=db
DB_PORT_5432_TCP_PORT=5432
DB_PORT_5432_TCP_PROTO=tcp
The text was updated successfully, but these errors were encountered: