Answer the question
In order to leave comments, you need to log in
Why does container return role "postgres" does not exist error?
Cloned the repository to the cloud. Nginx + django + PostgreSQL Containers started, then plugging.
I try to migrate, I get:
File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: FATAL: database "foodgram" does not exist
[email protected]:/home/dronsovest/foodgram-project# docker exec -it 86235d81aa7d psql -U postgres
psql: error: could not connect to server: FATAL: role "postgres" does not exist
Answer the question
In order to leave comments, you need to log in
How do you start a container with Postgresql?
Perhaps you do not specify POSTGRES_PASSWORD and then the database cannot be initialized.
See section *How to use this image*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question