Mysql2::Error: Unknown MySQL server host 'expvipdb'

Hi,

I used docker-compose up and it gave me Mysql2::Error: Unknown MySQL server host ‘expvipdb’ (-2) with the following docker-compose.yml file:

expvip:

build: .

restart: always

ports:

- “80:80”

links:

- expvipdb

- exvip_mongo

volumes:

- ./data/:/db

my docker-compose’s always have

networks:
  db:
  web:

and my containers always identify the networks like:

services:
  expvip:
    networks:
      - web
      - db

  expvipdb:
    networks:
      - db

not sure if that helps?

cheers,
Walther