Hello everyone, maybe someone encountered such a problem in Django, I create a database using a makefile, specifically docker-compose, and the database itself is created, but I cannot connect
create-db:
docker-compose up -d db
docker-compose exec db sh -c 'psql --username=postgres --dbname=postgres -c "CREATE DATABASE $(PG_DB);"'
docker-compose exec db sh
-c 'psql --username=postgres --dbname=postgres -c "CREATE USER $(PG_USER) WITH PASSWORD '"'$(PG_PASSWORD)'"' SUPERUSER;"'
docker-compose exec db sh -c 'psql --username=postgres --dbname=postgres -c "GRANT ALL PRIVILEGES ON DATABASE $(PG_DB) to $(PG_USER);"'
docker-compose rm -s -f db
If I didn't write something correctly, I'm sorry, I'm a beginner in this business