O arquivo yaml precisa ser atualizado:
version: '3.8'
services:
database:
image: postgres
container_name: database-api-cursos
restart: unless-stopped
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=h5UzM2kEnp8Q42
- APP_DB_USER=alura
- APP_DB_PASS=nJ6vsW37rCd1v88
ports:
- '5432:5432'
volumes:
- ./postgres/db:/docker-entrypoint-initdb.d/
- ./postgres/data:/var/lib/postgresql/data