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

Added postgres env data #357

Closed
wants to merge 2 commits into from
Closed

Added postgres env data #357

wants to merge 2 commits into from

Conversation

Finnlife
Copy link

@Finnlife Finnlife commented Jun 26, 2023

Added missing Postgresql connection data in docker-compose.yml

Resolves #356, Resolves #355

@t3easy
Copy link
Contributor

t3easy commented Jun 30, 2023

Please also add the Database name

@ggruening
Copy link

Maybe we're missing a few other environment-variables, too? See #358 and the answers. There seems to be a problem with elasticsearch and/or rake.

@Finnlife
Copy link
Author

Finnlife commented Jul 3, 2023

@ggruening Maybe there are.
But what did change that causes this?
When we know that, we will be able to find all missing env variables.

@t3easy I tried to add the DB Name as an Env var, but that didn't work for me.
I'm currently not able to test this because I only have access to a prod Instance of zammad.
I might be able to test this in a couple of days.
I just wanted to fix this issue for all of the users.

@t3easy
Copy link
Contributor

t3easy commented Jul 3, 2023

I just added this vars a few commits back but they are gone now with the commit for v6 without a comprehensible reason.

This commit for v6 seems very breaking to me.

@Finnlife
Copy link
Author

Finnlife commented Jul 3, 2023

Thank you, @t3easy, for your feedback.
I added the DB-Name in the envs.
I know that I added the DB Envs as Containers that did not have them in versions prior to 6, but I think I got problems at some containers because of missing DB-Envs.
Maybe there was a Change in v6.

I will look into this after this is being fixed / merged.

@AnXh3L0
Copy link

AnXh3L0 commented Jul 23, 2023

@Finnlife I am trying to setup Zammad via Docker, and I tried to add the vars, just like you did, but I still get the postgres auth error. Do you know if there's anything else that has to be changed in order for this to work?

@kamilkobak
Copy link

You probably need to change the authentication in postgres which is in the file pg_hba.conf
This file is in docker postgres volume: postgresql-data
In my case:
vim /var/lib/docker/volumes/zammad-docker-compose_postgresql-data/_data/pg_hba.conf

change last line to:
host all all 172.0.0.1/8 trust
(Include your docker network address here)

@Finnlife
Copy link
Author

@AnXh3L0 yeah I had this issue too.
Check if you 100% wrote the vars correct.
Its POSTGRESQL_DB not POSTGRES_DB as in the Postgres Container env.
If this doesn't help, send me your full docker-compose file

@fleverest
Copy link

This issue is not specific to this repository. As such, I have created PR 4735 on the zammad/zammad repo.

@ggruening
Copy link

@fleverest Thanks for finding that out! 😃 Let's hope your PR gets merged quickly. 😅

@t3easy
Copy link
Contributor

t3easy commented Jul 28, 2023

This issue is not specific to this repository. As such, I have created PR 4735 on the zammad/zammad repo.

I would like to see them set in docker-compose.yml + .env because services like the backup override the entrypoint. And it is much clearer how to adjust them.

@fleverest
Copy link

This issue is not specific to this repository. As such, I have created PR 4735 on the zammad/zammad repo.

I would like to see them set in docker-compose.yml + .env because services like the backup override the entrypoint. And it is much clearer how to adjust them.

You're right, I misunderstood the main issue for this PR

@thmo
Copy link

thmo commented Aug 13, 2023

Please add POSTGRESQL_HOST in addition. It might not be absolutely necessary in the case of (vanilla) docker-compose as the db container is automatically named zammad-postgres, similar to what the entrypoint script expects. However, in some cases, where the docker-compose.yml only serves as a blueprint (in my case, a script setting up a podman pod), the hostname might in fact be different. Adding POSTGRESQL_HOST would makes things more explicit and thus clearer, especially as POSTGRESQL_HOST is mentioned in .env.

As a side note, speaking of .env, it would probably be easier to simply use env_file with .env instead of listing variables individually.

@pgassmann
Copy link

with the most recent update, also zammad-nginx requires the postgres credentials zammad/zammad#4684

@mgruner
Copy link
Collaborator

mgruner commented Aug 23, 2023

@Finnlife please see #366 for a more complete version and let me know if this works for you. Thanks!

@mgruner
Copy link
Collaborator

mgruner commented Aug 23, 2023

Actually everyone is invited to test and give feedback, of course!

@mgruner mgruner closed this in 7f31a9a Aug 24, 2023
floriankessler pushed a commit to floriankessler/zammad-docker-compose that referenced this pull request Jan 5, 2024
…x passing of database credentials to containers

* Fix passing of database credentials to containers.

* Bump Zammad image version in .env.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants