oncall icon indicating copy to clipboard operation
oncall copied to clipboard

Getting this project up with docker-compose "Waited too long for DB to come up. Bailing."

Open surfer190 opened this issue 5 years ago • 2 comments

Just updated my docker-compose.yaml to look like this:

version: '3'

services:
  oncall-web:
    build: .
    ports:
      - "8080:8080"
    environment:
       - DOCKER_DB_BOOTSTRAP=1
    depends_on:
      - oncall-mysql

  oncall-mysql:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=1234

But it can't connect to the db? How do I fix this?

oncall-web_1    | Checking MySQL liveness on mysql...
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | DB not up yet. Waiting a few seconds..
oncall-web_1    | Waited too long for DB to come up. Bailing.
oncall_oncall-web_1 exited with code 1

surfer190 avatar Jan 10 '20 09:01 surfer190

Missing this part in the oncall-web section?

  volumes:
      - ./configs/config.docker.yaml:/home/oncall/config/config.yaml

sandipb avatar Jan 22 '20 00:01 sandipb

Checking MySQL liveness on mysql... OnCall is looking for mysql server at host name mysql in your docker-compose.yaml it's set up as oncall-mysql.

lukdz avatar Dec 16 '20 12:12 lukdz