Postgres authentication error - cannot run local and production on same machine with Docker
See original GitHub issueWhat happened?
Postgres authentication error makes it impossible to run local and production on same machine (with Docker)
What should’ve happened instead?
Unless I have misunderstood, this should be possible, per commit message https://github.com/pydanny/cookiecutter-django/commit/ae9dc2e782ccd734ef0dbe136960b09a8da1a760
building production stack on the same machine with local doesn’t lead to conflicts anymore;
Steps to reproduce
docker-compose -f local.yml build
docker-compose -f local.yml up
(hit Ctrl+C)
docker-compose -f production.yml build
docker-compose -f production.yml up
Oh dear.
postgres_1 | 2018-09-05 00:25:29.091 UTC [32] FATAL: password authentication failed for user "TjEvhJFUDaxcudETRTQzGgiJqryGIEOM"
postgres_1 | 2018-09-05 00:25:29.091 UTC [32] DETAIL: Password does not match for user "TjEvhJFUDaxcudETRTQzGgiJqryGIEOM".
postgres_1 | Connection matched pg_hba.conf line 95: "host all all all md5"
django_1 | Waiting for PostgreSQL to become available...
Host system configuration: OS, Docker & friends’ versions etc.
- Ubuntu 18.04
- Docker version 18.06.1-ce, build e68fc7a
- Docker Compose version 1.22.0, build f46880fe
Project generation options
project_name [My Awesome Project]:
project_slug [my_awesome_project]:
description [Behold My Awesome Project!]:
author_name [Daniel Roy Greenfeld]:
domain_name [example.com]:
email [daniel-roy-greenfeld@example.com]:
version [0.1.0]:
Select open_source_license:
1 - MIT
2 - BSD
3 - GPLv3
4 - Apache Software License 2.0
5 - Not open source
Choose from 1, 2, 3, 4, 5 [1]:
timezone [UTC]:
windows [n]:
use_pycharm [n]:
use_docker [n]: y
Select postgresql_version:
1 - 10.4
2 - 10.3
3 - 10.2
4 - 10.1
5 - 9.6
6 - 9.5
7 - 9.4
8 - 9.3
Choose from 1, 2, 3, 4, 5, 6, 7, 8 [1]:
Select js_task_runner:
1 - None
2 - Gulp
Choose from 1, 2 [1]:
custom_bootstrap_compilation [n]:
use_compressor [n]:
use_celery [n]:
use_mailhog [n]:
use_sentry [n]: y
use_whitenoise [n]: y
use_heroku [n]:
use_travisci [n]:
keep_local_envs_in_vcs [y]:
debug [n]:
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
psql: FATAL: password authentication failed for user "postgres ...
I was having the same issue with my local Postgres installation and the container I was running by using docker. I just stopped...
Read more >Exception when running in docker: org.postgresql.util ...
I want to dockerize my spring-boot application and be able to connect it to the postgres database container. What works: Running the application ......
Read more >Unable to connect to postgres inside a docker container
postgres peer authentication depends on the linux/unix user that runs psql being the same as user in the -U postgres parameter.
Read more >Don't install PostgreSQL - Using containers for local ...
A traditional system install just doesn't cut it. We need a way to run many different postgres instances, independent of each other with ......
Read more >Control startup and shutdown order in Compose
The best solution is to perform this check in your application code, both at startup and whenever a connection is lost for any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this issue from time to time after rebuilding. Only using local configs. I usually have to run both
docker system prune
anddocker volume prune
.I have the same issue with postgresql service not being started on
up
command. Did initialize my project today with latest master.