I am using django-cookiecutter template and for the second time for new project. And it fails to connect to postgres with following error:
postgres_1 | 2018-04-30 14:54:09.747 UTC [1] LOG: database system is ready to accept connections
postgres_1 | 2018-04-30 14:54:10.029 UTC [28] FATAL: password authentication failed for user "IViLGLIEWLBDGBnsAuoOEhtFaKrqKxfX"
postgres_1 | 2018-04-30 14:54:10.029 UTC [28] DETAIL: Role "IViLGLIEWLBDGBnsAuoOEhtFaKrqKxfX" does not exist.
postgres_1 | Connection matched pg_hba.conf line 95: "host all all all md5"
django_1 | PostgreSQL is unavailable (sleeping)...
One of the maintainers explained this:
the thing is, every time you bootstrap the project POSTGRES_USER and POSTGRES_PASSWORD get reset to a newly-generated random values
I tried to remove all docker containers but no success any idea how am i able to solve this? I dont have the old credentials to replace them.
With the help of https://github.com/webyneter (contributor to django-cookiecutter)
The solution is following:
docker volume lsdocker volume rm <your project_slug>_postgres_backup_local <your project_slug>_postgres_data_localIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With