Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add healthchecks to docker-compose.yml #186

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jerbob
Copy link
Member

@jerbob jerbob commented Aug 20, 2021

Adds django-healthcheck to the project dependencies, as well as the
relevant 'curl' command to the service's healthcheck. I've also added
a 'pg_isready' healthcheck to the database service, which allows us
to remove the netcat check from our entrypoint scripts.

@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #186 (9e89ec2) into master (fdaaabe) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head 9e89ec2 differs from pull request most recent head 9191e32. Consider uploading reports for the commit 9191e32 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #186      +/-   ##
==========================================
- Coverage   94.41%   94.34%   -0.08%     
==========================================
  Files         107      107              
  Lines        4767     4671      -96     
  Branches      272      269       -3     
==========================================
- Hits         4501     4407      -94     
+ Misses        223      221       -2     
  Partials       43       43              
Impacted Files Coverage Δ
src/backend/settings/__init__.py 72.85% <100.00%> (-3.69%) ⬇️
src/admin/tests.py 100.00% <0.00%> (ø)
src/admin/views.py 100.00% <0.00%> (ø)
src/backend/mail.py 100.00% <0.00%> (ø)
src/andromeda/client.py 42.42% <0.00%> (ø)
src/team/serializers.py 100.00% <0.00%> (ø)
src/challenge/signals.py 100.00% <0.00%> (ø)
src/authentication/tests.py 100.00% <0.00%> (ø)
src/authentication/views.py 100.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdaaabe...9191e32. Read the comment docs.

entrypoints/backend.sh Show resolved Hide resolved
src/backend/settings/__init__.py Show resolved Hide resolved
src/backend/urls.py Show resolved Hide resolved
@jchristgit
Copy link
Collaborator

Thanks, Jeremiah. This looks good to me. Merging.

Adds django-healthcheck to the project dependencies, as well as the
relevant 'curl' command to the service's healthcheck. I've also added
the relevant 'pg_isready' healthcheck to the database service,
which allows us to remove the netcat check from our entrypoint scripts.
@0xAda 0xAda force-pushed the feature/compose-database-healthcheck branch from 9e89ec2 to ea216e1 Compare October 23, 2021 17:01
@jchristgit
Copy link
Collaborator

Hi @jerbob, can you resolve conflicts here? It looks good to merge after that. Thanks!

@jchristgit jchristgit enabled auto-merge (squash) October 28, 2021 18:01
@jchristgit jchristgit added the enhancement New feature or request label Jan 15, 2022
Copy link
Collaborator

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

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

This is a good change!

I have some small requests for improvement, but that's it.

Please re-lock dependencies after removing psutil.

README.md Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
"health_check.cache",
"health_check.storage",
"health_check.contrib.migrations",
"health_check.contrib.psutil",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be handled by the host.

Suggested change
"health_check.contrib.psutil",

@jchristgit
Copy link
Collaborator

We think it may be good here to factor out the docker-compose.yml changes into a separate PR.

jerbob and others added 6 commits February 11, 2022 23:20
Co-authored-by: Johannes Christ <jc@jchri.st>
Co-authored-by: Johannes Christ <jc@jchri.st>
Co-authored-by: Johannes Christ <jc@jchri.st>
Co-authored-by: Johannes Christ <jc@jchri.st>
Copy link
Member

@thebeanogamer thebeanogamer left a comment

Choose a reason for hiding this comment

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

This gives out information which shouldn't be public. The checks in the docker-compose are good though

@jchristgit
Copy link
Collaborator

@thebeanogamer has implemented a few patches on top of the patchset here to work on production, which we will use for our monitoring, and merge by the next meeting.

@thebeanogamer
Copy link
Member

@dependabot rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants