Skip to content

Wait for healthchecks in make services#141

Merged
robertknight merged 1 commit intomainfrom
make-services-wait
Jul 10, 2023
Merged

Wait for healthchecks in make services#141
robertknight merged 1 commit intomainfrom
make-services-wait

Conversation

@robertknight
Copy link
Contributor

This enables starting apps with make services dev without potentially running into errors from the app due to services not being ready when the web server tries to connect.

Services must define a healthcheck [1] in docker-compose.yml for this to work.

The --wait flag is missing from the Docker Compose docs, but see docker/compose#8777.

[1] https://docs.docker.com/compose/compose-file/05-services/#healthcheck

This enables starting apps with `make services dev` without potentially running
into errors from the app due to services not being ready when the web server
tries to connect.

Services must define a healthcheck [1] in `docker-compose.yml` for this to work.

The `--wait` flag is missing from the Docker Compose docs, but see
docker/compose#8777.

[1] https://docs.docker.com/compose/compose-file/05-services/#healthcheck
Copy link
Contributor

@seanh seanh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause PRs to be sent to all cookiecutter-using projects that have services, so we may need to add missing healthchecks to some of those services when those PRs come.

@robertknight robertknight merged commit e890121 into main Jul 10, 2023
@robertknight robertknight deleted the make-services-wait branch July 10, 2023 13:14
robertknight added a commit to hypothesis/lms that referenced this pull request Jul 10, 2023
This is the result of running `make template`, to apply the changes from
hypothesis/cookiecutters#141.
robertknight added a commit to hypothesis/lms that referenced this pull request Jul 10, 2023
This is the result of running `make template`, to apply the changes from
hypothesis/cookiecutters#141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants