linkedin / linkedin/oncall

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

Open
#280 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.3k
Forks
245
PR merge metrics
No merged PRs in 30d

Description

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
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docker-compose.yaml and the oncall-web startup logs, then inspect how the oncall-web service checks oncall-mysql during startup. Done means the web container can reach the MySQL service and no longer exits after waiting for the database.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, mysql
Domain
databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.