I am trying docker-compose an app with django and postgres using docker-compose but I get an error with the "NAME"
Here is my settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'db',
'PORT': 5432,
}
}
Here is my docker-compose
version: "3.9"
services:
db:
restart: always
image: postgres:latest
ports:
- "5432:5432"
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
web:
restart: always
build: ./backend
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/usr/src/app
ports:
- "8000:8000"
depends_on:
- db
django.db.utils.OperationalError: FATAL: password authentication failed for user "postgres"
Thanks for your help