wger-project / docker

Production...ish docker-compose image for wger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django.db.utils.OperationalError: connection to server at "db" (172.20.0.3), port 5432 failed: FATAL: password authentication failed for user "wger"

gagestinson opened this issue · comments

          Hi! If you want to change the password for the database, you need to edit it in the compose file (db service, POSTGRES_USER and so on) as well as in the .env file (DJANGO_DB_DATABASE, etc). Also keep in mind that the db password is only set when the database is created the first time, just changing POSTGRES_USER won't do anything (the other settings are the ones the application will use during startup, you definitely can change those!). Also note that the db data is stored in the postgres-data volume, if you want/need to nuke it, `docker volume rm docker_postgres-data`

Originally posted by @rolandgeider in #79 (comment)


Hello!
I am running into this same issue. I have changed the password for POSTGRES_PASSWORD=XXXXXX in the docker-compose.yml file and the password for DJANGO_DB_PASSWORD=XXXXXX and CELERY_FLOWER_PASSWORD=XXXXX in the prod.env file.

After running the docker-compose up -d command, the terminal outputs the ERROR: for celery_worker Container "4441cf1acd82" is unhealthy. (mentioned in a previous thread here). Checking the logs of the corresponding container, wger_server, there is the line: django.db.utils.OperationalError: connection to server at "db" (172.31.0.3), port 5432 failed: FATAL: password authentication failed for user "wger"

Are there other passwords I am forgetting to change in the docker-compose.yml file or in the prod.env file?