sipcapture / homer7-docker

HOMER 7 Docker Images
93 stars 84 forks source link

DB connection to Azure postgres failing #147

Open gkrobo opened 1 year ago

gkrobo commented 1 year ago

https://github.com/sipcapture/homer-app/blob/master/docker/docker-entrypoint.d/1

I'm trying to configure the DB_HOST, DB_USER and DB_PASS by passing env variables to kubernetes container, however there is no config allowing to pass in env vairables such as :

example:

DB_NAME DB_SSLMODE

and therefore failing to authenticate to Azure postgres

error logs:

CONNECT to DB ROOT STRING: [host=Azure-postgress-host user=azure-postgress-db-user dbname=postgres sslmode=disable port=5432]

{"level":"error","msg":"Couldn't establish connection. Please be sure you can have correct passwordpq: no pg_hba.conf entry for host

{"level":"error","msg":"Try run: sudo -u postgres psql -c \"ALTER USER postgres PASSWORD 'postgres';\"","time":

panic: pq: no pg_hba.conf entry for host "redacted", user "redacted", database "redacted", no encryption


the connection string is defaulting these settings

dbname=postgres sslmode=disable