error Database connection failure: could not translate host name "db" to address: Temporary failure in name resolution in docker container

hay, i have docker-compose and install container for odoo 12, this is my docker-compose.yaml file

    version: '3.3'

services:

  odoo12:
    image: odoo:12.0
    container_name: odoo12
    restart: unless-stopped
    depends_on:
      - db12-odoo
    ports: 
      - 8013:8069
    volumes: 
      - odoo12-web-data:/var/lib/odoo
      - ./etc:/etc/odoo
      - ./addons:/mnt/extra-addons

  db12-odoo:
    image: postgres:12
    container_name: db12-odoo
    restart: unless-stopped
    ports: 
      - 9091:5432
    environment:
      - POSTGRES_PASSWORD=odoo12
      - POSTGRES_USER=odoo12
      - POSTGRES_DB=postgres12 
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
    - odoo12-db-data:/var/lib/postgresql/data/pgdata

  pgadmin12-demo:
    image: dpage/pgadmin4
    container_name: pgadmin12
    restart: unless-stopped
    environment:
      PGADMIN_DEFAULT_EMAIL: [email protected]
      PGADMIN_DEFAULT_PASSWORD: admin
    ports:
      - 7778:80
    volumes:
      - pgadmin12-data:/var/lib/pgadmin
    depends_on:
      - db12-odoo

      
volumes:
  odoo12-web-data:
  odoo12-db-data: 
  pgadmin12-data:

all service is running , but just service odoo12 is not running, when i access localhost:8013 in browser is error, and when i see logs service odoo12 , error like this:

Database connection failure: could not translate host name "db" to address: Temporary failure in name resolution

whats wrong with my config ? thanks

Source: Docker Questions