Getting this project up with docker-compose "Waited too long for DB to come up. Bailing."
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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